Display entries sharing the same nested category on an entry page
Get the first category of the entry you're currently on :

{% set currentEntryCategory = entry.categoryHandle.one().id %}


This assumes you limited the category to only be assigned once to the entry, otherwise you'll have to loop through all assigned categories to find the nested one you want.

Use that category ID to get the other entries that are relatedTo it :

{% set entries = craft.entries.relatedTo(currentEntryCategory).all() %}
{% for relatedEntry in entries %}
    {{ relatedEntry.title }}
{% endfor %}


If you want to exclude the current entry that you're on from the query :

{% set entries = craft.entries.relatedTo(currentEntryCategory).id('not ' ~ entry.id).all() %}