let's first consider optimizations for refinding thoughts. there are many well known mechanisms for improving memory, so i'm going to focus on three here that are relatively easy wins: simple to learn and high value. They are chunking, spaced repetition, and the method of loci.
the simplest is chunking, and it applies to both working and semantic memory. rather than remembering, for example, three letters as 'b, r, and t', you chunk them together into 'brt'. when combining just a few things this chunk ends up as a single thought in your memory that you can recall all at once and then split apart when necessary. this is famously used in telephone numbers to make them easier to remember, but you can find examples of chunking everywhere, especially in how you remember tradenames and common phrases.
a naive model of how this works is that thoughts can each hold some maximum amount of information. you store thoughts in your memory rather than raw information, so chunking allows you to better pack information into thoughts and make more efficient use of the space. this is especially useful for working memory since you can only keep about 5 thoughts in your head at once.
but packing your thoughts tightly does no good if you can't remember them. semantic memory relies on consolidation, yet you have little direct control over what gets consolidated. sometimes things you would like to remember fail to get consolidated while other things you perceive as less useful do. to ensure the thoughts you most care about get and stay consolidated, you can use the method of spaced repetition.
the idea of spaced repetition is simple: on some regular schedule you review thoughts to give them repeated opportunities for consolidation. often people optimize and automate this process using technology as simple as flashcards or as complex as anki, but it works even without tooling. for example, when you meet new people most of the time you need to see them a few times spread out over days or weeks in order for them to become fixed in your mind. without reinforcement at regularly intervals you're likely to forget them. the trick of spaced repetition is to take this natural method you have for filtering what information to remember and deliberately using it to choose what you will remember.
the most advanced technique i'll mention, and the one that takes the most effort to get the most out of, has been used for thousands of years and is known as the method of loci or the memory palace. the idea is to use episodic memory to construct narratives where you imagine a place in your mind that you can explore and move through to find information. this is how people could recite epic poems like the homeric epics from memory. before the modern era of cheap writing reproduction, most educated people learned the method of loci so they could reliably store information that they would have no other way to lookup later.
as this suggests, the method of loci is less popular now because we instead use memory augmentation systems, but it is still useful to some people, especially those who may not have the luxury of accessing the world's knowledge from a tiny device in their pocket or need faster recall than such devices allow. anyone who must react quickly and think on their feet without looking things up could stand to build a memory palace.
so now you have techniques to better use working, semantic, and episodic memory, and until a few hundred years ago this would have been the limit of what you could have done to improve your memory. but writing and the technologies dependent upon it allow us to do something more: we can augment our memories by storing thoughts outside our heads for later remembering by reinput.