As I read textbooks, I summarize the most important concepts (along with doing the exercises, if there are any) and write them in a notebook and then later (less than a week) enter the notes into Anki as cloze-delete flashcards. I don’t have an objective measure of retention, but I believe that it has vastly improved relative to when I would simply read the book.
I answered a similar question here.