You have two default default codes available for displaying both product categories (with a specific category of parent categories, for displaying subcategories), and products contained within a specific category.
Use shortcode to display top-level categories:
[product_categories parent="0"]
If you want to display subcategories, include the category identifier inside the parent attribute.
To display products within a category:
[product_category category="category-slug-here"]
Full link to this short code: shortcode product code and shortcode product code
source share