Your question is extremely vague which leads me to the assumption that you’ve never worked with the php mailer - the quasi standard for mailing in the realm of php. Check out this basic tutorial and Google your way from there to the specifics. Good luck!
Learn how to use Docker and host it on something that accepts that. That way you can choose where to host it. Every large cloud provider has some solution for containers. Some of them have free tiers you can use to learn.
Trust me, once you use containers there is no going back. It simplifies things so much. There's like a billion tutorials out there: https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
For simple static sites, I recommend Netlify. Their free tier has 100 submissions per month, so depending on how many responses you expect, you can do it for free. Assuming you host your site on Netlify of course.
For simple static sites, I recommend Netlify. Their free tier has 100 submissions per month, so depending on how many responses you expect, you can do it for free. Assuming you host your site on Netlify of course.