No, not all cookies require user consent. As the ePrivacy Directive states, there are cookies that are vital for a website to function properly, and they do not require consent. They are called strictly necessary cookies. Strictly necessary cookies can enable visitors to log into a website or use a shopping cart when visiting an online store. Therefore, it is impossible for users to opt out of them since they would not be able to access all the features on the website.
However, other types of cookies require consent if you are willing to track users for analytical purposes or to send personalized ads for them. Before tracking user actions and collecting data, you should receive consent by displaying a Cookie Banner that explains the purposes of tracking so users can make an informed decision on whether or not to accept cookies.
By displaying a Cookie Banner with all the required information, your website will become compliant with the latest privacy laws in the world. If you or your visitors are based in the EU, the most common law that controls cookie usage is the General Data Protection Regulation (GDPR).