How can I make specific products appear first in a collection using custom URL parameters?

I want to do the following: when a customer clicks on an ad for a product, this product X appears first in the collection. When you click on an ad for product Y, that product appears first in the SAME collection. I want to do this countless times for countless products. other platforms that copy Shopify do this. How can I do it? I will leave some examples below:

https://www.sisterparty.com/collections/best-seller

https://www.sisterparty.com/collections/best-seller?from_short_url=true&id=6ce602dc-6ee7-4158-b99b-ee67ad35684f&ids=1ba4830b-af71-49c3-8a8c-8f2391d79455%2Cd75d2e09-e960-4da7-ad9e-2d28dfdaf302%2Cef01d9c0-3943-4428-8d74-f4f6edeb3822%2C7b052b44-c94d-40a3-986b-16b19bc6507e%2Cfd69030a-6991-4d63-9dc9-ad5a376320c8%2Cbcc2c0b2-e9f9-40d9-8bac-d1ed623f9509%2Cac8a96fa-16a9-4612-88d5-14e409372e78%2C61f1b5c8-8aa1-43a9-a3c5-14230edcbce9%2C3f6e8886-c54c-4b02-b536-e4ea52f5e62d%2Ce39820c2-8d87-49f5-af4f-7d39f0d65c67%2C36a4ec27-5373-4f3c-ad20-97d2323a1b91%2Cdafc769f-80aa-429b-a6c2-df042da00f71%2C7818b836-1b6b-41c3-95a2-b3fbb18e18c2%2Caa6e4318-23eb-4a23-bef1-96e9a12f8e8d%2Ce1828c50-26ce-4230-9c75-2a7eb4533b33%2Cc50573b7-c77d-4dcc-b85c-b023e3a75d37%2Cdfd27532-02a5-4269-9a6b-087fdd40019f%2C3e175518-a59c-4a42-a6a5-d87d683d2670%2C0fa4130a-90b9-4253-83c5-07eb091c5698%2Cb037550b-3228-4591-8ed8-2e4d4bf00724&show_page=first_page

https://www.sisterparty.com/collections/best-seller?from_short_url=true&id=39d5aba5-76d3-4bd1-b8f4-c56a85824a83&ids=eeb33238-244a-4fa1-a0c7-7e8e1b953df5%2Cc726c360-e29d-4d02-8994-fe00444089e1%2Cb8fdf3db-4fc6-4003-af79-02176c17b4a9%2C32f51bcd-0e51-4281-8329-4df24e9c8e77%2C4a9db40b-6247-4769-8a91-3e4bdb52cdda%2C7087762f-cfd0-4cc4-aa89-2cdd49e49bf0%2C062f7c16-1fba-494b-a408-1dc86d29c6f7%2C922ceac8-76ef-4175-8422-a9e19a703e62%2C81a6a7a5-0831-4e71-816a-b257f625d4e3%2C113102fe-0de8-4680-ae71-234504545deb%2Cf261c02b-4430-4994-bb00-b9e637b4a91b%2C886250c0-c726-4a74-9db7-5c08b53074a7%2C07d0399e-e8af-4053-ad22-ffaeaa5c9d1f%2Cc246f49e-1a2a-4166-bcba-48a1ba76d037%2C5094c42a-99f8-4db4-9ced-8e0feaf4b075%2Cd963c81a-805c-4dce-bcd1-6d04acf8868f%2C71f7ef53-66d2-4c85-8373-b73478a80b1e%2C9910f910-fe22-44c2-824a-0954888bd1c8%2C162ad7b3-2801-4191-be71-694a077925db%2C96d3aad4-56e9-415b-a143-9859a79e3ddf&show_page=first_page

see that the collection is the same, the only thing that changes are the URL parameters and the products

Hi Joaofelipe!
Same problem here looking how to do so for around a week, Have you solved it by any chance? (If you did it would be awesome if you will be able to share how)
Thanks in advance :folded_hands: