Shopify computes related products from real order and catalog data and serves them from the Ajax /recommendations/products.json endpoint. You pass the current product's id and a limit:
fetch("/recommendations/products.json?product_id=" + productId + "&limit=4")
.then(function (r) { return r.json(); })
.then(function (data) {
// data.products is the array of recommended products
});
The response is { products: [...] }, each product carrying title, price (in cents), and url. Pass that array to the row's render and you're done.
AI tell: a hardcoded array of product handles, or pulling a whole collection and slicing it. The recommendations endpoint already returns the right products, ranked, fetch it.