Embedding YouTube Video in WordPress using Custom HTML block element.
So the YouTube Embed widget isn’t working in our version of WordPress. We can use another block element to embed it. That element is called “Custom HTML”, and it allows you to paste the embed code from YouTube Videos, and other places that provide you with embed code.
When you select that block element, it will look like the section below. In the image, I have included the code I used to embed the video below. You can see that it provides you with an HTML view and a Preview view. The HTML view lets you see the code (top image), the Preview mode lets you see what it will look like after it applies the embed code (bottom image).