Otherwise you're limited by what you can hold in your head - and as you get older and take on more ambitious work you'll find that's a pretty big restriction.
My version of that is spread out across way too many places now - it's mainly https://til.simonwillison.net/ and https://simonwillison.net/ for published notes, 700+ public GitHub repositories for code and issue notes, 100+ private repositories for private code and private issue notes, a Pocket account with 8700 items in it, plus the contents of my 15+ year old Dropbox folder structure, an old Evernote dump and a continually growing S3 bucket of larger things.
I tried to tie it all together with a unified search engine, but that needs some more work: https://simonwillison.net/2020/Nov/14/personal-data-warehous...