Will a contact form send a message to a Gmail account, or does it need to be an email that is with your web host?
Gmail’s a bit tricky. You should be able to send to Gmail (for example contactform@example.com to contactus@gmail.com). You’d need to make sure you’ve got correct SPF, DKIM, and DMARC DNS records on your example.com domain otherwise Gmail might send the form to Spam or reject it altogether.
However sending from Gmail to another email will likely fail (for example contactform@gmail.com to contactus@example.com).