Lots of misinformation on the internet wrt this, and I am not a lawyer either.
It's especially tragic because Google serves you countless factually incorrect articles if you search for gdpr, which doesn't help with this endless amount of confusion.
You might be interested to know that an IP address isn't actually PII, because that's a concept of California privacy regulation and they don't care about them
https://techgdpr.com/blog/difference-between-pii-and-persona...
It's a different story for gdprs personal data however. Because there are individuals with static IPs - which makes it possible to link these IP addresses to individuals.
If you could only omit these, you could technically use ipadresses however you want too. But I admit that that's kinda unrealistic ( • ‿ • )