Am i dooming my projects in the long run ?

I've tried programming SEVERAL times in the past but i wouldn't get very far because after begginer stuff like "how to make my character shoot" or "how to make it jump" i would search "how to make a simple inventory like RE" and then be punched by a (for me at the time) massive code walls filled with arrays and switches and complicated stuff that (at the time) felt ridiculously hard, so i would give up by thinking "if that's simple then im fucked".

So recently i started programming again but this time i decided i would fuck we ball my way through and if i din't knew a solution for something i wanted to do i would keep trying by myself until i find a way i can do the thing with the knowledge i know. 600 lines in a attempt at creating an inventory system i realize my code is in fact horrendous but it WORKS, but now the issue i am currently facing is this: Will my game be doomed by my shitty coding? i mean that as in stuff like optimizationb