Editor's Note: The following was written for Drupal 7, but should work as described under Drupal 9. The one main difference is that Drupal 9 does not have a "master" view, but you could have "block" or other types of views. Just make sure you're editing the view to which you want to apply a contextual filter.
Contextual filters in Views are powerful, but getting them to work perfectly can be a nightmare. This will hopefully save some people from the headaches I had.