How do mathematicians propose new theorems? It seems that for a lot of great mathematicians, it was an usual case in their procedure of creating new theorems that they first came up with a rough idea of the theorem, after that they started thinking about how to prove it (some would reshape their theorem while searching for a proof). That is to say, they knew the theorems first, and then proved it.
It makes me wonder that in such circumstances, where these theorems came from, and to what purpose they proposed the theorems? Do they build new theorems as a step toward the proof of a more significants conjecture, or they just notice some patterns from more basic facts and special cases? Can anyone experienced explain this procedure to me, and (better) list some possible triggers for their new ideas? Thanks in advance.

Most theorems come from someone trying to find a solution to a certain problem, and they find something interesting, like a relationship between 2 variables e.g. Pythagorean Theorem, or some constant e.g. the speed of light. They then try in a more general context, then if their idea holds, and they can prove it is true, then it becomes a theorem. If the idea holds, but they can't find a proof, then it is a conjecture, like the Collatz Conjecture.
