from my understanding i need to go to site settings and under security enable ability to install embeds

from my understanding i need to go to site settings and under security enable ability to install embeds
There is a web part you can use on a modern page to embed code into SharePoint. I don't think the web part requires the security change you mentioned.
Add content to your page using the Embed web part (microsoft.com)