- Best buy, considering both buildings and upgrades, is Kitten Managers. However this costs 900 quintillion and you have nowhere near that many cookies in the bank, Should you wait until you have sufficient cookies, or buy something else?
If the runs were of unlimited duration, then the "best buy" is exactly that; better to wait until you can afford it, rather than spend those cookies on anything else. However the fact that ascensions are possible means that at a certain point you will find it more worthwhile to ascend, getting extra production from prestige, than to continue the current run. If acquiring those kittens will take 100 hours at your current rate of production, and you only expect to be on this run for about 20 more hours, then obviously you won't be buying them this run at all so you may as well ignore their existence and buy the next best thing.
How to decide? If you have an idea of how long remains of this run, multiply by your current CpS to get a rough estimate of how many cookies you'll generate between now and then. (Don't forget to take wrinkler production into account when doing this.) Add this to the number of cookies already in the bank. Any item whose cost is greater than this total should be ignored when figuring what to buy next.
I do all this on my spreadsheet, however it would not be that hard to do it on a calculator or even pen-and-paper. There is only one calculation to do, but you need to redo it from time to time, since any formula for estimating the remaining time of the run can only give a rough figure, besides which your CpS is always increasing a little.