Here is how your method of proof works on the (regular) language $\{0^2,0^3,0^5,0^7\}$. I tried to construct a DFA for this language – the DFA accepting all strings, but while it accepts $0^2,0^3,0^5,0^7$, it also accepts other strings. What when wrong?
To prove that a language is not regular, we have to show that it is impossible to construct a DFA for it. Having tried and failed is not enough – maybe it's just difficult? For example, people believe that P$\neq$NP, but so far we haven't been able to prove this. Does this show that P=NP?
How, then, can we show that a language is not regular? One way is to construct the "canonical" DFA, and this leads to the Myhill–Nerode criterion (look it up). This method is complete in the sense that if a language is not regular, then you can prove this using this method.
Another technique is the pumping lemma, which is popular for historical reasons. The pumping lemma is not complete: there are irregular languages which satisfy the conditions of the pumping lemma, and so the pumping lemma cannot be used to prove that they are not regular.
There are other techniques as well, for example using closure properties of regular languages, or using structure theorems. Your specific language is a unary language (a language over an alphabet with size 1), and we have a complete structure theorem for these languages, which can be used to show that your language is not regular.