I’ve tried my best to look for solutions online but I can’t really find much. I’m not that technical of a user and found an approach that involved editing the /etc/systemd/logind.conf file however, the file didn’t exist in dom0, so I couldn’t do this.
So far I’ve done sudo nano /etc/systemd/logind.conf but it said it was a new file and it was completely blank. Then I went into Thunar and went to /etc/systemd but the only folders were network, system and user. No other files or folders were there.
drop-in see the 2.3.2 section from ArchLinux systemd wiki entry, your drop-in will be /etc/systemd/logind.conf.d/shutdown-on-lid-switch.conf (for example)