And for the language, I suggest learning or studying C, outside the context of Arduino programming.
For me there was nothing ever came close to "the Bible",
C Programming Language, 2nd Edition
by Kernighan and Ritchie
although I have it, the one that is in tatters here is the first edition. Both exemplary texts covering C, a tiny language by modern standards.
a7