Documentation page from Google about migrating to “Google Analytics Data API v1” can be found here: https://developers.google.com/analytics/devguides/migration/api/reporting-ua-to-ga4#reporting-api-v4
A REST API application definition example can be found here:
After importing the definition adjust Property ID in the URL, Request body and Client ID and Client secret and the import should be working.