If you need to embed content (such a YouTube video) in a modern SharePoint Online (SPO) page you can use the Content Embed WebPart that it has been built with the SharePoint Framework (SPFx):
This WebPart allows to embed the conted specified in the configuration panel. Depending on the content you want to embed, if it’s possible you get a message indicating that is not possible to add the content due to security reasons.
Fortunately, you can solve easily this problem by means of the HTML Field Security option available in the Site Collection Administration.
In the HTML Field Security configuration page simply add the domain of the content you want to add in the Embed Content WebPart:
And tha’s all, you will be able to embed your content in a modern SPO page using the Content Embed WebPart: