Hello, @Ruth89,
Actually, the product rating is coming and handled by the WooCommerce plugin in order to set the rating option on your site, make sure that you have set the settings of product reviews from the WooCommerce settings. To know more about it how to enable this and how it works here is a complete article on it: https://themeisle.com/blog/customer-reviews-for-woocommerce/
You can check the Yoast SEO plugin article as well: https://yoast.com/help/aggregaterating-review-offer-required/
Regards 8Themes Team.