Truth be told, I haven't really considered legality when hosting anything. Most of my stuff is self created with open source software for personal use. I'm going to guess and say all that is good.
The only legally questionable stuff I can think of is sharing public access to licensed software or somesort of copyrighted media downloader. Stay clear of those and you should be good.
There are also legal things such as TOR and, yes sometimes VPN, that can raise eyebrows. While they aren't illegal, many sites and services block them. I ran a TOR node for a few days, and within a week it seemed like 1/4 of the internet blacklisted me. Wasn't really fun. Had to change my MAC address and snag a new IP address from my ISP.
I don't really open my servers to non-family and friends. I don't want to spend the time being a babysitter for 20 sites. If that's a concern, perhaps rethink who you give access to.
Trust your gut. You kinda know if you're walking a line.
Good luck!
Just bought one a month ago. RPi5 was $80 (8gb ram, $60 for 4gb), case with fan was $5 and USB-C PD supply was $10.
Lowest n100 I see is $150. Still, they do look more beefy and probably worth it for some.