Another interesting rabbit hole to explore is the compiler. Back in the day I wrote a toy compiler for a college course and used this text book: "Compilers: Principles, Techniques, and Tools". a.ka. "The Dragon book", but I would look at some of the other books here like "Modern Operating Systems" before this.
The Dragon Book is literally a bad compiler book and you shouldn't read it. I don't know why people recommend it (not saying you did.) It explains things poorly and gets far too into the weeds on things that don't matter.
I recommend "Parsing Techniques: A Practical Guide" and Muchnick's compilers book - though there's probably something better by now.