You are trying too hard..😉
Let EE’s dynamic nature do the work for you.
First - create a template that lists alll entries in the channel. Don’t force categories in anyway. You want the full laundry list.
Second - create category links that link to the template you just created. You create category links by using tag pairs like {exp:channel:categories} using the {path} variable in the loop. EE will create links that have either the category url title or category ID in the URL.
When the template you created is linked to with a category link, EE will automatically filter the results down to just entries assigned to that category.