Yeah the compressor is usually the last thing to fail after everything else chokes it out. Check your refrigerant levels and airflow first, that's where most problems actually start.
And yeah, I'd add that if your airflow's bad, even a fully charged system will struggle and waste energy. I've seen plenty of units where the filter was so clogged it was basically choking the whole thing out. So start with the simple stuff before you even think about touching the compressor.
I used to think the compressor was the first thing to go, honestly. Back when my unit started acting up, I immediately assumed the worst. But after having a tech walk me through it, he showed me how a dirty coil and low refrigerant were actually starving the compressor. That changed my whole view on things, @elizabethg18, and saved me from buying a new system.