Steps:

1. Run the following:

sudo apt-get install realvnc-vnc-server

 

2. Raspberry Pi OS has the SSH server disabled by default. Enter

sudo raspi-config

 

3. Select Interfacing Options

– Navigate to and select SSH

– Choose Yes

– Select Ok

– Choose Finish

 

4. Learn your Pi’s IP address from your Pi’s terminal:

hostname -I

or from another device connected to the same network:

ping raspberrypi.local

 

Credits:

https://www.raspberrypi.org/documentation/computers/remote-access.html