>>11883543Through practice. There are also a few tricks.
1. Sometimes you can't prove something but you can prove it easily with an error of epsilon. Prove it that way and see if continuity will let you push epsilon to 0.
2. Know the various definitions and equivalences for open, closed, compact, etc and know the theorems about continuous functions on compact sets. They are extraordinarily useful and work just about anywhere if you use them correctly. Specifically, there is often a delicate balance between whether you should approach question involving compact spaces through the lens of converging subsequences, or through the lens of open covers, or just using a pre-made theorem you have already. Try all of them (starting with premade theorems)
3. Oftentimes you run into nasty expressions with big fractions, with trig functions, etc etc. If all you need to do is show that said expression is less than something, then don't work with that expression, work with a simpler expression which is greater than it. Use things like sin(x) < x for x > 0. Use common finite and infinite series formulas, like the geometric one. Sometimes it won't work but the whole point of this is experimentation and finding that balance.