Source

First step would be to know how you will create and run that website: writing it yourself, using a CMS like WordPress, static site generator like Hugo…

Second step would be to make it run locally. Now how to do that depends entirely on what you choose to use at step 1. If using a product like WordPress/Hugo, you can specifically search for how to do it on your specific OS. Linux might be easier in this regard (a bigger user base so a better support). Also keep in mind that you’ll (ideally) keep this website running 24/7. So either you keep your computer 24/7 (which can increase your electricity bill), or you can buy a very low power computer like a Raspberry Pi.

Once the website is running locally (meaning you can access it on your lan), you’ll have to open ports on your internet router (NAT). That is only possible if your internet provider is not giving you a CGNAT IPv4 address (the world is running out of IPv4, carriers are slowly making this a premium/professional feature). If you’re behind CGNAT, you’ll have to use a tunneling service (I can think of Argo Tunnels by Cloudflare… and it’s free!).

Lastly you’ll probably want to have a domain name because writing down IPv4 on a business card is extremely awkward. So get one and then you can create a A record that will point to your public IPv4 address. If said adresse is not static (meaning your internet provider is regularly changing your IPv4 address), you’ll have to setup a DDNS.

If all this works, you should start thinking of using HTTPS as it relatively easy to setup these days. You can simply install a reverse proxy like Caddy on the machine hosting the website. Setup the proxy such as traffic coming from your router passes through the reverse proxy and is proxied to the web server software. If that’s the case Caddy will automatically request a SSL certificate to Let’s Encrypt and serve your website on HTTPS. That way the website looks way more legit, and is more secured.

Alternatively, you can use Cloudflare as a reverse proxy, they’ll take care of the HTTPS amongst other things for you (including potentially spying on all the traffic that pass through their service, but that’s an entirely different subject).