This is optional, but I like to setup from fresh when the pi is just being used for one purpose:
- Install the Raspberyy Pi Images: https://www.raspberrypi.org/software/
- Install a fresh copy of Raspberry Pi OS Lite on to an SD card
- Configure WiFi to run the pi headless (pay attention to the capitalisation of the network name, one wrong character had me scratching my head for a while):