You can configure Matomo [1] to both not use any cookies [2] and to automatically delete just the raw data or all data that is older than x months. Log Analytics is also possible.
If you want something that is far more minimalistic, but also Open Source and self-hostable, you can take a look at [3]. (Not sure about how they use cookies)
(Disclaimer: I am part of the Matomo team)
[1] https://matomo.org/ [2] https://matomo.org/faq/general/faq_157/ [3] https://usefathom.com/
You can also configure to remove any data older than N days/months.
It is also GDPR compliant [2]
[1] https://resources.count.ly/docs/countly-sdk-for-web#section-...
That said, there are solutions where a cookie allows for greater privacy because it allows you to leave sensitive data on the client versus having to store it on the server. For example, https://usefathom.com/ is an open-source self-hosted analytics tool that uses a cookie to enhance privacy.