This question isn’t suited for StackOverflow but more of superuser.
You can try using docker containers for the server.
You can do this on all platforms with docker desktop for windows
You can use the screen
command on Linux.
It’s also recommended to seek a Minecraft host.
solved Problem with my mc server created on google vps [closed]