Taxonomy term page going to 404

Following @CraigWayne’s suggestion to use Query Monitor…

Message: “Use of undefined constant term_name – assumed ‘term_name'”. Count: 1. Location: wp-content/themes/elegant/taxonomy-source.php:38. Caller: wp-includes/template-loader.php wp-includes/template-loader.php:74. Component: Core. >>>>> Line 38 in taxonomy-source.php included “”

it was objecting to term_name in my taxonomy-source theme file; I changed it to $term = get_queried_object(); followed by name; ?>

The takeaway for others experiencing a 404 taxonomy term template – it might be dodgy code within the template file.