When you are trying to learn something and get frustrated, do one of these things: take a walk, brush your teeth, cook a meal, brush a cat, spray the weeds, take out the trash, wash the dishes, do the laundry.
Before you start reading a book, read the table of contents, the back cover, the frontmatter and backmatter, then re-read the table of contents carefully.
Before you read a chapter, skim the headings, look at the illustrations, read the bolded text, read the summary notes at the end, read the questions at the end, then re-read the headings.
If you're struggling to keep everything you need to solve the problem in working memory, try to decompose the problem into subproblems and chunk them into longterm memory to free up working memory.
When you read something interesting, immediately look away from the book and try to recall it; explain it, as if to a rubber duck. Then read it again in the book.