Things you host on the public Internet should be kept inside a DMZ on your network. This simply means that you should create a network segment that can't reach any other machines so that if/when your server is compromised, the attack is limited to access on that server (attackers can't access other computer on your network). https://www.fortinet.com/resources/cyberglossary/what-is-dmz
Even after you create a DMZ and host your server inside it, you'll still need to worry about hackers compromising your server and using it to launch attacks against others from your home IP (usually as part of a botnet) or using it to distribute illegal content.
Things you host on the public Internet should be kept inside a DMZ on your network. This simply means that you should create a network segment that can't reach any other machines so that if/when your server is compromised, the attack is limited to access on that server (attackers can't access other computer on your network). https://www.fortinet.com/resources/cyberglossary/what-is-dmz
Even after you create a DMZ and host your server inside it, you'll still need to worry about hackers compromising your server and using it to launch attacks against others from your home IP (usually as part of a botnet) or using it to distribute illegal content.