Can you be more specific about what happens when you reboot? Does it go to blank screen, a blinking cursor, or just shut itself off? Does the operating system start and just get stuck somewhere in the boot process, or does it not even get that far?
I think F12 is the BIOS key, if that helps. If it attempts to boot the operating system, you can press one of the arrow keys to see the boot log.
From the sounds of it, the OS might not be starting at all, which is a very strange thing to happen after installing a desktop environment. My best guess is that apt uninstalled something important. As other folks said Ubuntu 24.04 is pretty unstable at the moment, so you might have more luck with Fedora, or Ubuntu 22.04 or 23.10. One thing you could try is booting into your (K)ubuntu live medium and running
sudo grub-install /dev/sda
, to reinstall the bootloader, just in case something broke it.Pressing F12 while the Framework logo is visible (but before the OS starts) opens the BIOS boot menu. I assumed incorrectly that that is what you were trying to do with Escape. Trying to boot that way might help elucidate why the OS won't start. You could also get into BIOS settings that way, or boot a USB drive.