We created a basic (free) and a paid Google Analytics 4 modules for X-cart 4. They can help you with your mandatory transition to GA4 (you only need one and we recommend the paid one as it does more).
https://www.bcsengineering.com/store/free-google-analytics-4-basic.html
https://www.bcsengineering.com/store/google-analytics-4-plus.html
We also will be doing our 3rd revision of our Free Google Analytics 4 Crash course/boot camp here in March!
You can sign up to be notified here:
https://learning.bcsengineering.com/google-analytics-4-boot-camp
Carrie