Ways to install Mod packs and Plugins for your Minecraft.
The Minecraft Server download from Mojang is free (the client you have to pay for).
To try out your own server follow the basic steps below:
If you are needing to do so, update your java first before continuing to install Minecraft.
java -Xmx1024M -Xms1024M -jar minecraft_server.1.19.2.jar nogui
If you do need extra information the you cannot go past the detailed instructions listed on the Minecraft Fandom page.