For many uses I need to use my Android phone or tablet as second screen so I start to study how to obtain it from scratch by duplicate the monitor.
I find linux-second-screen project on github but his guide is not from scrach so there I explayn step by step how to duplicate the screen between your Linux and your Android phone.
Prepare your system
This method work only for x11 not for wayland.
sudo apt install x11vnc
Share the pc display with the command
Now at your ip:5900 your computer share a VNC server that share your display.
To know your ip you can exec
Download a VCN client, for example androidVCN.
Open the app and set your ip, your port (that is correct by default) and click connect.
Now your display is shared!
This solution can scale also with virtual monitor to use your android device or anything else as second screen.
This method is the easyest, but also the less secure, infact you can use this method only in your private network because your ip is not visible outside.