A spectrum analyzer, if calibrated, offers you to measure a RF power AT SELECTED FREQUENCY. If there are other components like harmonics or spurs, you can separate their power from the power of your desired signal.
A power meter has a sensor responding to heat; so all signals, wanted or unwanted, do heat the sensor and you measure their combined effect. To be sure that you only measure a desired signal, you must use filters (and know their insertion loss ) . Such operation is done in spectrum analyzers, so if they are calibrated, they are better - they also cost much more for being better.