You can easily embed HTML embed codes using either the classic or block editor.
Here is an example of a Youtube embed code, copied into the ‘Classic editor’.
From the Youtube ‘share’ option I selected ‘Embed’, then copied the Embed HTML code.
In the WordPress Page, I pasted the code into the ‘Text editor’ tab:
In the ‘Visual’ Tab, the page showed the content: (note not all embedded content will show in the visual tab)
The embed code in the page:
For info on embedding content using code in the Block Editor see this guide: https://docs.campuspress.com/en/articles/362-embed-content-using-embed-code