Custom Taxonomy leads to 404 page

You can add flush_rewrite_rules() after registering your custom taxonomy.

NOTE:
Flush rules only on activation or deactivation, or when you know that
the rewrite rules need to be changed. Don’t do it on any hook that
will triggered on a routine basis. More detail information in the
comments on WP Engineer’s post: Custom Post Type and Permalink

OR

You can go to Settings → Permalinks → Save Permalinks, that should flush the rewrite rules manually.