As @Geek99 suggests the rhythm is the foundation and where I’d start if I had to again. I didn’t learn it well until someone started to write out rhythmic connotations. Once you’ve got rhythms move on to scales.
Once you feel ready to read some songs, try and make them ones you don’t know so you’re not sub consciously using your ear.