Hello,
The shop page is a functional page and it is not editable. You can configure showing categories in Appearance > Customize > Woocommerce > Product catalog, you can configure showing categories in the shop/category page, when a user goes to the category he would see sub-categories.
At the same time, Woocommerce does not provide the option to do vice versa.
Alternatively, you can show the sub-categories then categories by means of HTML block shown in the top filter.
Create HTML block, and add tow Product categories elements, configure them to show the set of certain categories in each then follow these steps:
1. Enable Top filters in the Theme Settings > Shop > Shop filters https://gyazo.com/3564df2a5d658a0010b6c0ebd0b537d4
2. Enable Shop filters area always opened
3. Shop filters content type should be set Custom content
4. You can choose the HTML block with the content from the Shop filters custom content drop-down.
Best Regards