I write software in many languages that does the things i want it to do. i understand how to write code that works. most of the time i write software it works on the first few tries. i don’t do a lot of copy pasting. i write functions and use libraries to create things. it’s strange to me, but from what i hear, it’s becoming rare for people to really understand how to make software.
if you really want to learn from the ground up you could try playing the game Turing Complete! i recommend.