Should I restart my computer when prompted?
Yes, you should. A restart is required when an update to the Linux kernel has been installed. These updates are usually security updates, and then only come into effect after a reboot. When it comes to updates to applications like LibreOffice Writer, you only need to restart the application to apply the update, there's no need to reboot. Updates to a Snap application won't be installed while the application is still running.
If you wish to avoid having to restart your computer after an update to the kernel, you can use Ubuntu LivePatch Service. This is included with Ubuntu Pro, which is free of charge for personal use.
How to restart:
To restart the computer in Ubuntu 23.04, click the system menu in the top right corner of the screen, and then click the power icon. In the sub-menu that appears, click "Restart...".
To restart from the command-line, run this command:
$ sudo reboot
The downsides of restarting:
On the whole, restarting is a safe operation. Of course, when you restart the computer, you lose all the information in RAM, so make sure you save all open documents and files before shutting down your computer. While you are restarting, your computer will be offline for a few minutes. If you're running a server, it will be down for a few minutes. If you have an open SSH session, it will be terminated. You may need to manually start services that weren't configured to start automatically. If you're using full-disk encryption, you will need to authenticate yourself to decrypt the disk.