First off you are going to have to download the server software provided by Mojang.
You can find it at this link: https://www.minecraft.net/en-us/download/server
When you are done downloading, you will need to make a folder somewhere on your computer called mc server. Then drag the file you just downloaded into it.
Yours should look something like this so far.
In this folder you are going to make a new text document. Call it “start”. Now in this text document you are going to copy and paste this command:
“java -Xmx2048M -Xms2048M -jar server.jar nogui”
Yours should look like this.