How can I correctly install GA4 tags using GTM on my site?

We are currently using UA and attempting to get data in GA4 as well.

We have been told by Google’s technical support team that we need to embed the “view_item” event and “purchase” event code from the following URL into Theme.liquid.

https://developers.google.cn/tag-manager/ecommerce-ga4#measure_productitem_list_viewsimpressio

However, I am told that I need to rewrite the variables in the green and pink areas for shopify, and I don’t know what those variables are.

Can anyone help me with this?

*I am currently using GTM.

Thank you in advance.