WordPress Hook execute before pre_get_post

I load products based on cookie for that i need to check cookie exist or not before pre_get_post hook execute. i tried parse_query hook this i will work but execute multiple times on load. I write code after cookie create reload page, due to multiple exe i’ve got error ERR_TOO_MANY_REDIRECTS.

Kindly please advise.