The challenge with GA today is that the default code that Google gives you includes Tag Manager, and they encourage you to include DoubleClick as well (can't remember if that is in the default).
If you go out of your way, you can implement GA, by itself, the "old way"--which is GDPR compliant out of the box. It's Tag Manager and DoubleClick that are not.
I always find GA docs/instructions confusing, but when I try to see what current GA instructions tell you about how to include GA in a page, I get this:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=[ID]"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '[ID]');
</script>
Is that the "old way" or the "new way"? Maybe it's an even newer way, which is essentially similar to the old way?
If you go out of your way, you can implement GA, by itself, the "old way"--which is GDPR compliant out of the box. It's Tag Manager and DoubleClick that are not.