Craft CMS contact form plugin works locally but not in production?
There's a support article here you can help use to debug email deliver issues: https://craftcms.com/support/troubleshooting-email-errors#dealing-with-email-delivery-issues

The TL/DR is, use a transaction email provider like Postmark, Mailgun, etc. and make sure you've got DKIM/SPF and DMARC all setup properly as well.