Prefix of drupal: in front of certain dependencies and what does it mean?
The 2nd is the correct way as per: https://www.drupal.org/docs/8/creating-custom-modules/let-drupal-8-know-about-your-module-with-an-infoyml-file but I think drupal is assumed for the project if its not specified (The first part before the : )

So for Drupal core modules they'd prefix with drupal: and for custom modules its usually the module name e.g. webform:webform as they are projects of themselves