I have an idea for an app for awhile (5+ years) and it took awhile (a year or more to figure out how to develop on - I know C/C++/FORTRAN, started in the punch card era). I ended up using the MacBook I had, some books and chatGPT and plunged into development. BTW this was all happening while I'm retired, included moving to FL from MD. There are times where development stops for months at a time, I've started and stopped at least four or five times on different portions of the project. I've realized that I can actually skip the user interface until the end if ever.
At the beginning of code development, I did little more that "Hello world" programs to get my feet wet. Golf, pickleball, doctor appointments, etc. interrupts development. When I get back to it, my code has "disappeared", I open Xcode, open the project and I don't see any of my code - where did it go?
I did find the code using the Finder in Directory/projname/projname/ContentView.swift (I'm not sure why projname is duplicated, no doubt my ignorance!) - so the code is still present, somewhere!