Do you mean the layout of your page? If so you can create different product page templates and then assign them to different products: https://shopify.dev/tutorials/customize-theme-create-alternate-templates
You can assign it to all of the products for which you want a specific template by:
From your Shopify admin, go to Products > All products.
Click the name of a product that you want to use new template on.
On the product page of your Shopify admin, under Theme templates, choose your new template from the Template suffix drop-down.
If this isn't what you mean perhaps you are talking about collections and grouping products together: https://help.shopify.com/en/manual/products/collections/automated-collections/