I think there needs to be a lot more discussion about this around here because people need to be made aware that Google Analytics 4 (GA4) is very different from the previous version (Universal Analytics).
Having just tried GA4 on a new website of my own, I can say that I will not be "upgrading" my XenForo website to use it and I would strongly recommend that everyone else avoid it — for now, at least. Don't try to change your Universal Analytics code and don't try to upgrade your site.
Despite all the cheery articles from Google and content marketing sites stuffed with platitudes and buzzwords about GA4, it represents a radical shift away from how most of us think about and track our websites. GA4 is really targeted towards marketers and app developers who are more interested in tracking conversions and events. If you want classic site metrics like sessions, page views, and bounce rates, GA4 is not for you and should be avoided, which I presume covers almost every XenForo site owner like myself.
I would recommend waiting to see how GA4 evolves and how Google positions it. I predict it will take years of evolution before it becomes a practical choice for any of us.