If you are tty mode in kali linux and you have to switch it to gui mode then follow these steps:
login to tty mode
you have to connect your laptop to internet(by using ethernet cable or by usb tethering through mobile)
now run the command:
apt-get update
apt-get full-upgrade -y
apt-get install -f gdm3 or apt-get install lightdm (choose any 1)
reboot
after running these command you will get login page in gui mode
after login if you see blue blank screen in gui then again enter in tty mode by pressing(ctrl+alt+f1)
and run the command
apt-get install gnome
reboot
that’s it.