a) Buy a usb hub with hdmi port, to connect to a monitor or tv
b) Either use hub from point a or bluetooth to connect keyboard and mouse or a joypad
c) Either use android if you want to make a tv box, for example, or a gaming console (with emulators or microsoft xcloud) or install Termux on Android or Linux directly to use it as a Linux server
d) If you want to connect via remote you can use Linux apps, if you installed Linux, or Android apps like Airdroid
This works even if something is wrong with the smartphone, for example I am using one with touchscreen no longer responding, since if works with hub from point a and a cable mouse.
You can
a) Buy a usb hub with hdmi port, to connect to a monitor or tv
b) Either use hub from point a or bluetooth to connect keyboard and mouse or a joypad
c) Either use android if you want to make a tv box, for example, or a gaming console (with emulators or microsoft xcloud) or install Termux on Android or Linux directly to use it as a Linux server
d) If you want to connect via remote you can use Linux apps, if you installed Linux, or Android apps like Airdroid
This works even if something is wrong with the smartphone, for example I am using one with touchscreen no longer responding, since if works with hub from point a and a cable mouse.
Excellent solutions!