I installed Bookworm Lite on my Raspberry Pi but then thought it would be nice to install the GUI.

First make sure you update the Pi:

sudo apt-get upgrade
sudo apt-get update
sudo apt install xserver-xorg raspberrypi-ui-mods

There will be quite a lot of packages to install.

Say Yes and the installation with proceed.

If you would like to set the Pi to boot into the GUI, or not, run:

sudo raspi-config
System Options > Boot

Here you can choose:

B1 - Console Text Console
B2 - Desktop Desktop GUI