We hope this guide will work for you.
Step1: Get the GA4 Global Tag
As you have the account now, it is time to get the new global tag and insert it into your Shopify store.
Find your new GA account in your Google Analytics, and then > Click Admin > Data Streams > Click the Tag > And then find Global Tag and copy the full code

Step 2: Insert the tag into Shopify’s main theme file
The global tag should be on every page. You should insert that into the Shopify theme’s main file: theme. liquid - right below
.
Shopify Admin > (left bar) Online Store > Themes > Actions (near your active theme) > Edit Code — And then find theme.liquid. It should look like this >
Step 3: Get your checkout tag from Analyzify GA4 Wizard
Everything was standard until now. Now we have come to the existing part. Our team has prepared a special code block to be inserted and rendered in your Checkout/thank you page. It includes Shopify’s shortcode for order confirmation details such as order ID, revenue, etc - and also GA4’s Purchase Event tag including your measurement ID.
Go to our free tool > Analyzify GA4 Wizard for Shopify, fill the simple form, and get your code. It should look like this >
Copy the code and move to the next step.
Step 4: Paste the code into Shopify’s Checkout screen
As this is an e-commerce purchase code, it should be rendered when someone makes a purchase. Shopify allows us to add additional scripts into “Order Processing” and “Thank you” pages. Go to Shopify Admin > Settings > General > Checkout and then find Order Processing > Additional Scripts - and paste it there.
Step 5: Verify
All good! It should be working perfectly now if you followed the steps properly. You can wait for some purchases to happen in your online store so that you can check if data flows into your new GA4 account.
I hope you find it useful and feel free to let us know if you have any questions or face any issues.
(Source: How to set up Google Analytics 4 on Shopify - DEV Community )