Idiom for "trying to figure something out"?

Solution 1:

A similar idiom in English: "I'll have to chew on that for a while."

How it may affect your dental health compared to sucking caramal is debatable.

Less interesting, but gets the job done: to mull something over.

Solution 2:

I think rack one’s brain may fit in your context:

to strain in mental effort, esp to remember something or to find the solution to a problem.

(Collide Dictionary)