I have a question about server stuff

so im making a forum site with my friends and im using infinity free as my host. the site got ddosed once we made the domain public and i want to add ddos protection. when i want to add cloudflare, it tells me i need to remove some nameservers, in this case, i need to remove all of them except cloudflares servers. will our site work if we remove all the nameservers or should i leave the ones used for hosting the site thru infinity free?

You have to remove those other name servers. Just make sure your Cloudflare DNS has all the records your current DNS has.