Youtube media thumbnail size
Drupal core issue regarding this problem:  https://www.drupal.org/project/drupal/issues/3042423

After patching, I would implement the new hook_oembed_resource_data_alter:

function MY_MODULE_oembed_resource_data_alter(array &amp;$data, $url) {
  if (strpos($url, 'youtube.com/oembed') !== FALSE) {
    $thumbnailUrl = str_replace('hqdefault', 'maxresdefault', $data['thumbnail_url']);
    $data['thumbnail_url'] = $thumbnailUrl;
  }
}


Then I would also run an update hook to update the existing thumbnails:

function MY_MODULE_update_N(&amp;$sandbox) {
  /** @var \Drupal\media\MediaStorage $mediaStorage */
  $mediaStorage = \Drupal::entityTypeManager()-&gt;getStorage('media');
  if (!isset($sandbox['progress'])) {
    $result = $mediaStorage-&gt;getQuery()-&gt;condition('bundle', 'video');
    $mediaItems = $result-&gt;execute();
    $max = count($mediaItems) - 1;
    $sandbox['progress'] = 0;
    $sandbox['mediaItems'] = array_values($mediaItems);
    $sandbox['max'] = $max;
  }
  $progress = $sandbox['progress'];
  /** @var \Drupal\media\MediaInterface $media */
  $media = $mediaStorage-&gt;load($sandbox['mediaItems'][$progress]);
  if (!$media-&gt;get('thumbnail')-&gt;isEmpty()) {
    $media-&gt;get('thumbnail')-&gt;delete();
  }
  $media-&gt;updateQueuedThumbnail();
  $media-&gt;save();
  $sandbox['progress']++;
  $sandbox['#finished'] = empty($sandbox['max']) ? 1 : $sandbox['progress'] / $sandbox['max'];
}