Start with the cabinet boxes. If they're solid wood or good plywood, the doors open and close properly, and there's no water damage under the sink, painting is usually the smarter spend. Replacing sound cabinets mostly pays for demolition, disposal, and new counters that have to be cut to fit.
Replacement makes sense when the layout doesn't work for you, when particleboard is swollen or crumbling, or when you're changing the kitchen's footprint anyway. Paint changes the color and finish, not the floor plan.
The quality of a cabinet paint job comes down to prep and product. Doors should come off, every surface should be degreased and scuff-sanded, and a bonding primer should go on before the finish coats. Cabinet-grade enamels level out smoothly and cure hard enough to handle daily use.
Plan for a few days without full use of your kitchen while doors are off and coats cure. New hardware is an easy upgrade to do at the same time, since everything is already off the doors.
