generally as a rule of thumb, weakspots are lower glacis, machine gun ports, or roof hatches.
This is what I usually go by. When in doubt, shoot tumors, lower glacis or the little hatches. 99% of the time it's a weakspot. German tanks have engines in the front, russian tanks have ammo in the lower glacis, etc.
Then you remember the exceptions, like exceptionally tough tumors or extremely soft sides that get overmatched easily (T30 roof top by any tier 10 gun, T28 sides, etc).
For example, if you're fighting an E-50... you remember E50's lower glacis is just as tough as the upper so you don't bother shooting that if you can't pen the upper. You go for the sides, or the commander's hatch, etc.
Then you take into account of your angle relative to the tank (is the tank on a slope, rendering the upper glacis angle useless? Is it cresting and exposing its lower plate?) and then pray to RNGESUS that your shot goes where you want it to.
Or it's cresting and has its front wheel exposed, which leads to a shot that can both track + damage the tank. All of these things to consider just come with experience.
At ranges > 300, you basically shoot the tank and hope it pens. You still aim for the weakspot but at those distances its more or less just RNG.