Like any other attainable skill, it becomes better with practice.
First, start reading descent novels- any kind of novel that you will. It can be Stephen King-type, Tolkien-type, Dune-type- anything.
Start your critical thinking practice with humans. Empathize with them. Also become a little cynical. Try to find out someone's motives, background, etc. behind what they do and tell.
This is way you can practice critical thinking a lot. Never judge anyone. Judgmental mentality clouds clear thinking.
Try to understand where the character of a novel comes from, why they do what they do. What would you have done? These lead to better situation-reading for any situation.
Then, do anything that requires critical thinking. Play chess. Learn HS/college level math. Solve a lot of problems yourselves.
Look at past questions from coding competitions. Do not worry about the time. Solve them.
To be good at critical thinking, just practice thinking.
I also suggest maintaining a journal/blog. Here you write your heart out, simply walk the steps that you have traveled while solving a problem. If there is a thought clouding, just write is down clearly. Do not worry about writing quality. Just write.
Writing makes thinking mamy times better. And I do not say that lightly.
Maintain habits where you practice critical thinking.