Try checking if your caching plugin supports excluding cookies from being cached. For example WPRocket has an option and more docs on this topic https://docs.wp-rocket.me/article/1382-never-cache-cookies .
As an example for a cookie, “woocommerce_recently_viewed” is used for Recently Viewed product grids and it stores the products that were visited. Try adding it to the cookie exclusion list.