The kitchen and bathroom are two places where you can actually get a positive return on investment (ROI) by doing a remodel (in case you ever need to sell your house in the future). But to get that kind of ROI, you need do the right amount of improvements. If you spend too little, you may not get a good ROI. The same is true if you spend too much.
The amount you “should” spend to get the best ROI will depend on the neighborhood you live in. A good realtor should be able to tell you what kind of improvements would produce the best ROI for a particular house. They should also be able to give you a ballpark estimate for said improvements. You can start with that and decide if that is good enough for you or not.