I recommend the book “Code: The Hidden Language of Computer Hardware and Software”. https://www.barnesandnoble.com/w/code-charles-petzold/1100324884?ean=9780137909100
There’s a second edition, I’m not sure how good it is, but the first edition is excellent and will make sure you understand every part of the computer.
I also recommend the course Nand2Tetris and its accompanying book The Elements of Computing Systems, where you will build an actual computer from the ground up with just code.
They removed their lidar sensors after the prices had already come down.