These guides cover what every home server needs before it runs anything useful. Read them in order if you are starting from scratch: choose a machine, learn to manage it remotely over SSH, make it reachable from the internet through your home router, and then put a first service on it, a website.
Choosing home server hardware
How to pick home server hardware: Raspberry Pi 5, Intel N100/N150 mini PCs, used office mini PCs, old laptops and NAS boxes, with sourced idle power figures.