How to determine the code for settings.php config override based on .yml? I am trying to put my API keys in a separate file instead of storing them in config management.

For example, I installed the Commerce Stripe module.

When I export the config, it looks like this:

commerce_payment.comerce_payment_gateway.stripe_test.yml

uuid: 430a9544-c852-4a14-b7b0-3a833a02dd06
langcode: en
status: true
dependencies:
  module:
    - commerce_stripe
id: stripe_test
label: 'Stripe Test'
weight: null
plugin: stripe
configuration:
  publishable_key: thisishidden
  secret_key: thisishidden
  display_label: Stripe
  mode: test
  payment_method_types:
    - credit_card
conditions: {  }
conditionOperator: AND


Now, I want to store publishable_key and secret_key in a file, but how do I determine the "path" to call them?

$config['whatgoeshere?']['configuration']['secret_key'] = 'abcdefg';
The first key is the name of the config object/file, so... commerce_payment.comerce_payment_gateway.stripe_test.

The rest you already figured out, it's an array that's recursively merged into the other one.