You can find a lot of guidelines around GDPR or ePrivacy made by the EDPB or a DPA. For instance:
https://ec.europa.eu/justice/article-29/documentation/opinio...
This says that cookies for a shopping cart or user preferences are exempted from consent. The ICO and the CNIL say the same, as expected.