I have a 9th generation Celeron mini pc and I want to leave it on 24/7 to serve as a personal server.
My main goal is to be able to keep running scripts I make in python (I'm studying computer science), create a personal VPN and also be able to manage some files, put or remove movies to use in something called "plex".
What would be the best operating system to do this?
Important detail, I'm going to keep this mini PC in my house, but I'm going to live abroad for a few months, so remote access would be a fundamental part.
PS: I have 0 experience in home servers.
proxmox
With Proxmox, OP's system would have very little chance of fully locking up or powering off. VMs and/or containers could. But the hypervisor itself should remain up and stable. This would be a big plus for accessing the system remotely.
After installing Proxmox, create a very lightweight VM or container running a VPN server and forward the correct port(s) on your router. I think most people here favor Wireguard. And make sure the VPN service starts at boot up, and the VM starts up automatically.
Once that's done, you should have remote access to manage Proxmox. From there you can create one or multiple VMs to do all of your home lab stuff. If and when you mess things up and you can no longer access your services, you can still VPN into your network and access the Proxmox console. From there it is trivial to gain console access to your VM for "local" troubleshooting. And you can easily manage snapshots and reboot your VM(s) as needed. Just make sure you keep the VM with VPN up and running.
Last tip for OP:
Configure your system's BIOS so that the machine powers on after power loss. That way it comes back up after a power outage. Also, consider getting a smart plug you can remotely control. Then you can force a power cycle if needed.