This feature let you display related items as swatches on the product page. Customers click a swatch to jump directly to that product’s detail page.

This method is quick and simple, but all products will display the same group of Linked Products.
Steps:
Go to Online Store > Customize > Product page (Default product)
Main Product > Group Product > Add block > Linked products
Enter the information directly in this block:
Products: select the list of linked products
Option name: set the option name (e.g., Color, Size)
Option values: enter values separated by commas
Linked product type: choose the display style (Block / Block with color / Image with title)
Color selector size: choose swatch size (Small / Medium / Large)
Image ratio: select image ratio (Adapt to image, Square, etc.)
Click Save

This method allows you to set different Linked Products for each product.
Steps:
Go to Content > Metaobjects > Add definition, name it Linked variation
Linked Variation ID
Type: Single line text (One value)
Name: Linked Variation ID
Use this field as display name: Checked
Required field: Checked

Option Name
Type: Single line text (One value)
Name: Option Name
Description: Enter an option name
Required field: Checked

Option values
Type: Single line text
Name: Option values
Choose: List of values

Products
Type: Product
Name: Products
Choose: List of products
Required field: Checked

After adding all, click Save → you will have a Metaobject with 4 fields.
Go to Settings > Metafields and metaobjects > Metafield definitions > Products > Add definition.
Name: Linked Variation ID
Namespace & key: theme.linked_variation_id
Type: Metaobject → Reference to Linked variation (Metaobject created in the previous step)
Go to Content > Metaobjects > Linked variation > Add entry and fill in the information.
Note: If “Option values” is empty, product title will be shown by default.
Go to Products > open a product → scroll to Metafied → Link Variation ID → select the entry you created.
(You can reuse the same entry for multiple products.)

Go to Online Store > Customize >Product page (Default product) > Main Product > Group Product > Add block > Linked products block connect it with the Metaobject and fields created.