A lot of people keep a diary. This is a time-tested way of ensuring
future historians have juicy rumours to read and write books about.
A journal is like a diary, but it's meant to be more serious and less
saucy.

I've been keeping a journal for some years now. It's been good in
several ways:

It's a private place where I can vent entirely without any
inhibition. As long as I don't leak the content, I can write
anything there, things I couldn't share even with my closest friends
and loved ones. In my journal I don't need to be fair or balanced or
diplomatic; if calling my boss a poophead helps me, I can do
that in my journal. More importantly, apart from name-calling, I can
be open in my journal about my hopes and dreams, and speculate as
freely as I need to about all sorts of crazy ideas. If I want to
fantasize about writing my own Debian installer, my journal is where
I'll do it. In my journal I don't have to worry about people
misunderstanding me, or attacking any vague, half-developed crazy
ideas, and ridicule me about them for the next several years.

It's a place to keep an external memory. One of the the things I put
in my journal is a stream of consciousness while developing. This
allows me to answer questions of the form "what the bleeding heck
was I thinking then designing this software" with quotes from my
younger self. Perhaps more usefully, this can be applied to
debugging as well: tricky problems often involve a lot of data to be
kept to fully understand what's going on, and a written journal is a
better place for that than the brain.

A bug tracker is usually not a good place for this, or not the full
stream of consciousness. Most of that stream is necessary for the
process, but other people shouldn't be flooded with all of it, only
the actually relevant parts.

I also put all sorts of other bits of information into my journal.
In fact, over the years it has developed into a
personal knowledge base, where I can find a bunch of things that
are relevant to me, but not necessarily easy to find online. As an
example, what's the command to do TOTP on Linux that works with
Amazon? (oathtool --base32 --totp, not too difficult to find but
easier in my journal.)

Some information is private in nature, such as who were the people I
had that interesting lunch with at that conference that one time.

There are a myriad of tools for keeping a journal, or personal
knowledge base. There's wikis of various flavors, plain text files in
git, online document services, etc etc. You can keep it on paper as
well, though that makes grepping harder. As I prefer to not pour my
heart and soul into a service run by other people, my journal is an
ikiwiki instance that I run on my laptop, which renders a static
HTML that is served via Apache on my laptop (and only to my laptop).
This satisfies my needs for ease of use and privacy.

Using a wiki engine for this is nice, because linking adds a lot of
power and can make finding relevant information faster. Using the
ikiwiki inline directive, which produces pages by collecting other
pages based on a pattern, I get pages for particular people (link to
the person, the person's page includes the page linking to them),
topics (e.g., projects), tags, and more. Quite nifty, and I'm afraid I
can't show you.

Keeping a journal takes a bit of effort, of course. It also takes time
for a journal to become useful: having diary entries for a week
probably doesn't help much. Having them from a decade changes this in
a qualitative, not just a quantitative way. Do you remember what you
got your loved as a present seven years ago? I don't even remember
what I got as a present last year.

Give it a try. It doesn't have to be perfect, but you need to keep
doing it. Report back in a comment below in four years from now and
tell use if it was helpful to you.