How to create Media video youtube entity programmatically?
Code example:
use Drupal\media\Entity\Media;

$media = Media::create([
  'bundle'      =&gt; 'my_youtube',
  'uid'         =&gt; 1,
  'name'        =&gt; 'my_video',
   'field_media_oembed_video' =&gt; [
    'value' =&gt; 'https://www.youtube.com/watch?v=iZ53oOOTsdc',
   ],
]);

$media-&gt;save();