Your brain can re-fire old neural patterns, and it is the combination of areas of your brain being lit up that drive our thoughts. See article - https://neurosciencenews.com/memory-science-22803/
Think of your brain like a computer hard-drive. Some sections are very heavily 'write protected' as they save critical information. For example, knowing how to breathe. These are patterns your brain needs to always reliably refire off, no matter what, so they get saved in specific 'non-plastic' areas.
On the other hand, some parts are more akin to RAM memory and are prone to being overwritten. For example, you are out of milk and should get some more, or where you left your car keys. Annoying as these things are, it is good to keep some brain 'plasticity' as this helps you with stuff like creativity and reasoning. Children have a metric fuck-ton of this stuff, which is v. important for learning and adapting to the world.
With enough repetition, your brain gets better at recreating a certain pattern - or forming a memory or an idea. Sometimes, you will be better at remembering something because a certain brain area was provoked, such as pain. If a lion mauled your arm off, it would really fucking hurt and make you instantly fearful of big cats. On the other hand, if I gave you a veerrrryyy boring 2 hour lecture on the dangers of lions instead? You would be fine with a trip to the kitty exhibit at the local zoo, simply because I left a very weak 'print' on your mind.