How to apply a patch file in composer to a submodule of a module?
Use admin_toolbar.

"drupal/admin_toolbar": {
  "Bring back media to dropdown menu": "https://www.drupal.org/files/issues/2019-01-16/admin_toolbar-media_link-3026216-3-option2-D8.patch"
}


Then run composer update or composer update --lock if you want to apply your new patch and do not want to update any packages.