I have previously used Partkeepr
https://www.partkeepr.org/ for this purpose. It might be a little excessive for single-user stocking, but if you share a lab among four people(as I did), it's worth it's weight in gold. Easy to set up, free, with project capabilities, filtering, storage locations, etc. etc. designed for small businesses and the like. It's just a bunch of PHP scripts and an SQL database, so you can easily modify it to fit your needs, if you are so inclined.
To be honest, I only set this system up because while I looked for something to replace the excel sheets we used to keep track of our parts I was at an unrelated training at the company that developed Partkeepr(its a small EE company located in Augsburg, Germany) and saw their flyers.
My verdict on it: For Open Source and free, it's the best inventory tracking system I have seen. Yeah, it requires discipline. But it works, and it works quite well. If you have an excel sheet with filters and VBA in the back, Partkeepr is probably the same/less effort for more features
It can be used as a full ERP suite(but only if you run a very small company/ your hobby shop wich for some obscure reason requires full ERP), but I have never used these parts, only the part keeping portions. We managed a database with about 100 "standard parts" like resistors and caps of different values/sizes and maybe another 75 more specific parts, ICs and the like, so a bit larger than many hobbyists might have. Also, again, these parts were used by four People instead of just one, so the managing effort necessary was higher that for the average hobbyist. For this purpose, it was a great tool.
Do I recommend it above just keeping a bunch of excel sheets? If you have large BOMs on a regular basis(say, three dozen individual parts) - absolutely! If you work with multiple people - absolutely! But for a single hobbyist with small projects, I think the extra effort to set it up and maintain your parts database is not likely worth the effort. Nor, for that matter, are complicated excel sheets with VBA scripts, in my opinion. Just do what others here recommended - order exact quantities of your parts. For standard resistors and capacitors, take one all-purpose form factor(for me, its 0603 smd) that you can use on almost all your projects and order say 100 of each E12 or E24 value of these once. You can use them up for any project and just need to check occasionally when you use many of them how your stock levels are...