Show related Content type content in block filtered by category
At first, category and sub-category should be in Drupal-terms. Taxonomy vocabulary, taxonomy terms etc.

Assuming your related content block is created with contextual filters.

You can add these contextual filters to your views:


Content: Has taxonomy term ID (with depth)


Display content if it has the selected taxonomy terms, or children of the selected terms. Due to additional complexity, this has fewer options than the versions without depth.


Content: Has taxonomy term ID depth modifier


Allows the "depth" for Taxonomy: Term ID (with depth) to be modified via an additional contextual filter value.