Recently, several European countries, including Austria, France, Italy, and Denmark have declared the use of Google Analytics illegal. That is, even if you asked for the consent of your website visitors.
There is one way, though, how you can continue using GA4 while being fully GDPR compliant.