Cookies are not always bad. Sometimes they are bad, sometimes they are useful.
Good cookies are, for example, the ones that a website uses to store some useful information, like the fact that you logged in as a registered user, or decisions you made regarding your use of the site, like whether you prefer dark mode or light mode, or whether you are OK with the website using performance monitoring cookies. Good cookies are generally useful, helpful, and are not used to track you across the web and build a profile to be sold to advertisers.
Bad cookies cookies do not have to be harmful or problematic, but can be. Such cookies can be, for example, tracking cookies used by a performance monitoring system to record how you use the website you are on, and can give important information to the manager of the website as to what works, what does not work, and how to improve.
On this website, I use these:
Consent: I record your preferences in the browser's local storage. This is tecnically not even a cookie but a better option with none of the bad side-effects of cookies. You can change your preferences at any time using the cookie dialog box that you can open clicking on the cookie icon in a corner at the bottom of the screen.