I want to play with my friend on a minecraft LAN world that I made, and I don't know how. I tried realms but I figured out that you can't have mods on realms. After that i tried hosting my own minecraft server but because of my wireless internet it didn't work. I also tried a free server hosting one but that also didn't work. Could you please help me out? Me and her really want to do a minecraft roleplay together... I can't purchase a server either..
You have two options to set up a server in this situation.
Use the open to lan function from the pause menu, note the port that it assigns to you
Open that port on your router, and forward it to your computer. (SuperUser would be the best place to ask how, not here).
Determine your external IP, and have your friend connect to it, with :'portnumber' on the end. (from the multiplayer window)
Download the Minecraft Server file from microsoft and run that on your machine (or a spare if you have one)
Open the port 25565 on your router, and forward to your computer [or the spare] (as above, ask in SuperUser)
copy the 'save' folder from your machine .minecraft folder to either the folder where the server is running on your PC or the one on the spare machine. Run the server, and wait for it to setup the needed files. Close the server. Edit the server.properties file so the world name matches the folder name of the save you copied. set any other settings you want in there too. (if you get stuck, delete the server.properties file... it will recreate.
Connect your minecraft to either 127.0.0.1 if it ran on your machine, or the IP of the spare machine.
Determine your external IP, and have your friend connect to it, with :25565 on the end. (from the multiplayer window).
Before making any changes to anything, please take sensible backups! :)
You should just be able to go into the pause menu and click open to lan, that should work but otherwise I'm not sure.
Since you can't purchase a server, your only option to play together would be to use a program like Hamachi or Tunngle which will, in simple terms, emulate your connection to where it acts as if you two are playing in LAN mode.
I personally would use Tunngle as it has better reviews and works better in my opinion, but they've shutdown recently, so use Hamachi.
Aternos is a free Minecraft server host that supports multiple server types (Vanilla, Forge, Spigot, Bedrock, etc.). It is limited in how large of a world you can upload, but if you're starting from a new world, it is a good option. I have used Aternos and it works.
A more complicated alternative would be to set up a local server on your computer. This would be easy for anyone on your network to connect to without any port forwarding on your router. To get started, I would recommend looking up a guide on setting up a Minecraft Forge server. Forge because it has an installer.
Then if you want others outside your network to have access, I recommend looking at ngrok. It is pretty easy to set up and works well on Windows and Mac (Linux is supported but I haven't tried it). The only hassle is that every time you start it (on the free version) the address would change. But with just you, your friend and maybe a couple others at some point, it's not hard to simply post the address to some sort of group chat.