1. your graphics driver isn't loading/working;
2. you can't log into the GUI due to a bug in the login screen;
3. you are working on a server that is headless, i.e. doesn't have a GUI installed, or are SSHing into a server/other machine.
I've experienced (2) a while ago and more recently there was another issue recently with upgrading breaking a system [1]. I also encountered the latter but was unable to keep the terminal open due to that bug (it kept switching back to the login screen), so I had to boot into a system via a USB stick, chroot into the system, then install the uninstalled desktop package.
[1] https://www.gamingonlinux.com/2025/04/ubuntu-25-04-upgrades-...