Suppose a Turing machine is fed all the basic axioms and it uses the mathematical inference to prove theorems then using these theorems it proves further theorems and so on. At every iteration it checks whether the "Newly" proven theorem is the twin prime conjecture (TPC) or not if yes, it terminates if not it goes on.
Please correct me if I am wrong .
I think you might have the idea from This video. The idea is mentioned at minute 24. However afterwards it is mentioned that there are problems that cannot be decided by a turing machine, for example the halting problem.
Since we know that the halting problem cannot be solved by a turing machine, we know that not every problem can be solved by a turing machine. It may however be possible to prove the twin prime conjecture using this method, we just don't know.
If it where undecidable, it could not be proven by our current system of mathematics.