If you know what you want to make, buy for that project. Are all the blocks going to be exactly the same? You can buy exact amounts.
But if you like variety and scrap quilts, you buy things you like when you see them, (especially if the price is right - but don't confuse quality on special offer with cheap because it's nasty) along with the basics, black, cream, white on white etc. If you're short of one fabric, you just add another similar one to the mix, because you have it already - no waiting for the postman. Leftovers should not be binned, unless the bits are so tiny you can't get anything out of them, or the fabric was such poor quality you don't want to use it again. Someone grew that cotton and it used many resources, don't waste it.
To build a stash, take out the fabrics you have and sort them by colour and value (light or dark). You can then see if you have too many of some colours/values or not enough, and buy to fill/replenish the gaps. Remember, you may not like a colour - you wouldn't wear it for example - but you should still buy it. Why restrict your choices when that bit of lime green may be just the thing to sharpen up the palette you'd chosen that's looking a bit dull.
Stash building is not a rapid process and depends on opportunities and finances. It needn't be huge, and you can keep fabrics as long as you like before you use them. If you fall out of love with them, piece them up into a back and buy something you do like.
If you can find it, Color and Cloth is useful (there are copies on Amazon
https://www.amazon.co.uk/Color-Cloth-Quiltmakers-Ultimate-Needlework/dp/0844226203).