Almost every time I set up a Raspberry Pi these days, I use the 'Lite' version of Raspberry Pi OS. That version doesn't come with a GUI, it just boots to the console. It's much smaller in size and contains most things you'd need for a 'headless' Pi setup.
And if you know your way around the command line, it's not daunting to plug in a monitor, keyboard, and mouse, and explore via the shell if you need to.
But every so often, I've had a Lite install that I wanted to switch to GUI, but I'm too lazy to pull the Pi out of wherever it's installed, pull the microSD card, and re-flash it with the full OS, and then re-run my automation on it to set up whatever I had running before.
And that's why it's nice to be able to just install the GUI on top of an existing Lite install!
To do that (assuming you're running the latest Pi OS version, Bullseye as of this writing), just install Xorg and the Raspberry Pi 'PIXEL' environment: