Much of what people know isn’t worth knowing.
How much of tenth-grade mathematics do you remember?
But for things you’re interested in, you remember it all.
The books you chose to read you remember. The books you were forced to read (or avoid) by the school are forgotten.
When boredom with a topic strikes, move to another topic and keep learning.
Don’t confuse boredom with the topic at hand as a sign that you’re just bored of learning altogether.
When you learn what you like, you remember what you learn.