The language of first-order Peano arithmetic seems to me rather limited. As far as I am aware, you have only the symbols $S, 0, +, \times ,= $. Now the theorem of unique factorization into primes, states that for every $n$ natural number, there exists a unique finite increasing sequence of primes $(p_k)_{k \leq m}$, such that $n=p_0 \times \cdots \times p_m$, but since this language has no inherent notion of sequence, I don't know how this theorem can be written in this language.
Is there a simple way of working around this problem? I'd like to point out, I am not very familiar with logic and I am mostly self taught.
Yes.
You can easily code the notion of a finite sequence into the natural numbers with the language of arithmetic. There are many ways, for example Godel's $\beta$ function, or using prime powers.
But the idea is that you can uniquely code every finite sequence of natural numbers as another natural number. And you can do that in a recursive way (even primitive recursive), so that the decoding process of the length and coordinates are also recursive (and even primitive recursive).
Then prime decomposition becomes easy to state.