Between Explaining Computers, Jeff Geerling & Network Chuck on Youtube you should be able to get a server up and running on an old machine. You can then install Lemmy via docker or whatever.
A home network server can be pretty safe & simple, exposing that server to the internet should take a little more thought and planning.
Digital Ocean or similar is likely the simplest way to try it.
https://www.digitalocean.com/products/droplets
Create a $4pm Ubuntu droplet & install Lemmy.
Probably cheaper to run per hour than an old pc and install of the OS is instant and disposable. If you do something stupid or get hacked, you just delete and start fresh.....no need to worry about l33t haxxors all in your home base.
Not watched but this sort of thing: https://www.youtube.com/watch?v=4fzCUEpFnDg