Oh no! Something has gone wrong. A problem has occured and the system can't recover

From the Recovery Menu:

Please arrow key to root - drop to prompt and run:

sudo dpkg-reconfigure gdm3