Being able to do math in an exam is kind of its own skill. I don't think there's much more to it than knowing the right tool for the job, knowing how to use it, where you might go wrong, how to fix it if you do, and doing everything fast enough. You can definitely get good at it without really understanding the underlying concepts (I knew people with top grades who were completely unable to explain a concept 1-2 years after that exam). The only way you can really develop this is practice.
I would still encourage you to understand what you're doing, I get that might not always be practical if you don't have a lot of time but IMO it'll be better for you in the long run. I think university has more emphasis on understanding rather than just doing and builds on past knowledge much more, how big a jump this is might depend on where you are.
If you can be more specific on what concepts you need to know and what parts you struggle with in particular maybe we can help you better.
Famously, both Newton and Einstein struggled with the subject
If you're referring to "Einstein failed math at school" that's a myth.
Here's an article that apparently has Einstein's own response.
Here's something with his grades. If you mean he needed some help with higher order tensors then sure...
First time hearing that about Newton, at least in those words... Maybe harder to say either way since it won't be as well documented...