Check input on the server
A form that rejects a bad email in the browser is helpful, but anyone can skip the browser and send data directly. Every field must be checked again on the server, and anything you put into a database or an email should be treated as untrusted text.
Add some protection against bots and spam on contact forms too, such as a hidden trap field, rate limits or a simple challenge.
Keep the pieces up to date
Most hacked small sites were running an old plugin or library with a published fix. Turn on update alerts for your platform and packages, and look at them on a schedule.
Send the right headers and watch for trouble
Serve everything over HTTPS and add headers such as Content-Security-Policy and Strict-Transport-Security. They limit the damage if something slips through. Then set up uptime and error alerts, so you hear about a problem from a tool rather than from a customer.