>>10958288This is good advice but not the only way.
It might be just as effective to let the professor introduce the material, but then you have to go to the textbook/class examples and solve them without looking at the solutions, then move to related exercises in the end of the chapter and try to solve those too.
Then, when you get stuck you can either google it or ask the professor next time.
When you do it this way, you develop your problem solving more, and you start to understand intuitively how to solve these problems. Whenever you see a new one, you'll have a better toolbox of approaches to solve it.
As for others having a stronger base than you, that's probably true. Hard work will beat everything else in the long run though.