It depends. For books that have exercises, no. I just do the exercises. For books without exercises, yes. Usually I try some of the key proofs, or to write some code that uses it.
Usually with math/stats books I’m reading it for a specific purpose, so I start using it right away. For instance, I had to do some differential geometry and Lie algebras recently. I did problems in the book until I understood the material and then wrote some code that used it.
For the PL theory stuff, I mostly just tried to write a simple Scheme-like language interpreter that added worked with the thing or tried to use a new language that leveraged the ideas. When I was reading about compilers I basically just started adding compiler stages to a simple compiler. When I was reading about dependent types I played around with Coq, Agda, and Lean.