You could use both Universal Analytics and Google Analytics 4 for your Magento 2 store before Google announced that UA is going away on July 1. Now you need to move to GA4.