To get started, you should first create a GA property. Use the Analytics Help for assistance.
Configuration is done at the standard module configuration page:
Google Analytics Version Compatibility
9.2.11 release in November 2021, Open Y
added support for Google Analytics 4. If your site has been updated to Open Y 9.2.11 or greater AND the
google_analytics module has been updated to 4.x you should be able to use GA4. Otherwise you’ll need to stick with GA3.
See this community post for more information.