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
Or use scrcpy with the same keyboard you already have and save your neck some of the pain of staring down at your phone (as can be seen in the post).
The bonus being that typing properly works (the lag on Bluetooth drives me insane and often a key press is missed)
You can do that with iPhone, too, using the (poorly named) "USB Camera Adapter", which splits out a USB type-A jack. (I assume you need a similar adapter on most Android phones, too, since I've never seen one with a type-A jack built in.)