This is not a joke: Read the Intel manual, maybe check out some of the learning repos on github that solves all the glue-stuff that isn't important. I have one such repo here:
Andrew Tanenbaums book is good for the theory. Real world is a bit blurred so it's also worth reading about some modern development like eBPF (very handy for tracing too)