error 500 with contact form 7 and SEO plugins

Hello I get an 500 internal errorwhen I try to update a page on elementor and this only happens on pages that contained a contact form 7 I tried to deactivate the plugins and the problem disappeared by deactivating Yoast seo I tried to look for an alternative to this plugin and I found rank math but I received the same error 500 i tried to install yoast seo in the local version of the siteweb and i didn’t recieve the error i need an SEO plugin and contact form7 too how can i fix this?