I'm currently self-teaching analysis by reading From Real to Complex Analysis by R. H. Dyer and D. E. Edmunds. My strategy at the moment is to go through the book slowly, coming up with examples of objects that satisfy each property mentioned, and proving every lemma and theorem (and doing every exercise) myself, before looking at the proof provided in the textbook.
As I go, I'm creating a LaTeX document containing questions that I can look back at to remind myself of all of what I need to remember (e.g I have "state theorem X" and "prove theorem X" as questions for every theorem, so I can regularly remind myself how to prove things) and the answers to those questions, including proofs for every theorem, and my solutions to the exercises, in the document.
It's working so far, and I feel like I'm gaining a really good understanding of the material, but it's incredibly slow. In fact, my solutions document is longer than the section of the textbook I have gone through so far. I have time, as in I'm not in university, so I can take 6 months to finish the first chapter if I want, but I also don't have time, in that I'm busy studying for other things as well. I also would like to get to the more exciting content that is later in the book, but I don't want to feel out of my depth when I get there.
Is this a good strategy for learning maths from a textbook?