At least with android devices, you can plug in any usb keyboard, and have it work. Those are free, in the garbage all over the place
For example, on usb-c iphones, I can plug my camera with a c-to-c cable in mass storage mode and it shows up. So I expect a dumb a-to-c adapter would work. On my lightning-based iphone, a c-to-lightning cable doesn't work.
I'd assume it's the same for androids and keyboards.
You even see the phone screen mirrored on the monitor, complete with mouse cursor etc.
The sad thing is it is just literal copy of the phone screen. It does not have a "desktop mode".
I've used it while on holidays connected via HDMI to the TV in the hotel, with a bluetooth keyboard/mouse and it performed admirably.