It is interesting that you include a list of activities that could well include consciousness and attention all under the umbrella of “thinking.” It is this combination of a large number of interacting processes that make this a useless term. What you are really asking is “how does the whole brain work?”
Consciousness is likely to be the “vehicle” that carries the thinking process but as I indicated in the linked post - consciousness is composed of many sub-activities that work together to create a final result.
I dare say that nobody in neuroscience will be able to tie all of these together into a whole until someone gets a working AGI to stand as an example.
If you feel up to the task I will be delighted to read your take on how all this works.