The GDPR is not “cookie law”, it only prohibits tracking users in a way not essential to the operation of the site using locally stored identifiers (cookies, local storage, indexed DB…)
Storing a cookie to track login sessions, or color scheme preference does not require asking the user or allowing them to decline.