[SOLVED]Tell me what I'm doing wrong please

i fixed it thanks @BarryCarlyon and @Dist for coming to the rescue. I removed the function and just placed them at the bottom after i appended the parent containers to the body. before the function being saved to the variable was looking for the div with id 2 but it wasnt in the document yet. Thanks again. And @Dist i haven’t put any parent yet and but it still works. Im asuming when i deploy this to heroku i put heroku as a parent but since im on localhost rn it doesnt need to have that filled yet