Can we upgrade to GA4 using matomo tag manager?

Is there a way to upgrade to ga4 but keep the matomo tag manager ? What would be the steps involved ?