Where to store code samples

I am currently storing all my code samples in TXT files and trying to keep them categorised by using folders, but I remember a while back I had an app which could store code samples in a repository/DB which I could put in tags which I could use to quickly search for them. Unfortunately that was a long time ago and now I’d like to see if there’s any freeware programs available to do this.
So how do you guys store your code samples?

Sounds like you’re asking for recommendations for “snippet manager” or “code manager”. Time ago I used PoSh CodeManager heavily. But that was before VSCode. Now … for quite a while I’m actually using VSCode only.