I am stuck on proving a lot of the theorems that are discussed in number theory. Most of the theorems that I've seen in number theory so far are the ones I've already been shown how to prove, but I don't get the general approach for finding out how to prove them.
Let's say, for instance, we want to prove that there are infinitely many prime numbers. I know the basic methods of proving statements like direct proofs, proof by contradiction etc., so we could suppose that there are finitely many primes $p_1, p_2, \cdots,p_k$ with $p_1 < p_2 <\cdots < p_k$ by contradiction. Then in the next step of the proof, a new integer n is defined as $n = p_1\cdot p_2\cdot\space\cdots\space\cdot p_k + 1$, and because it is greater than $p_k$, it is composite since we assumed that there are finitely many primes. But the thing I don't get though is how $n = p_1\cdot p_2\cdot\space\cdots\space\cdot p_k + 1$ just came up so randomly.
I understand that continuing the proof eventually leads to the contradiction that 1 is composite, but the trouble is I don't know where to start just in general.
For example, if I wanted to prove that there are infinitely many primes of the form $6\cdot k + 5$ for some integer k, where would I start? I've tried doing something like defining $n = (6k_1 + 5)(6k_2 + 5)\cdots +(6k_r+5) + 5$ for $r$ primes of the form since I'm assuming that n could be a new prime of the form maybe (not too sure), but from there, nothing seems to be working out and I cannot get a contradiction in any way. And even if I did want to get a contradiction, how would I know what will end up being the contradiction in the end?
Is anybody able to help me with this? Thank you in advance.