This question can be broken down into 4 stages (numbers don’t match diagram since I think this flow is a bit more intuitive)
Refrigerant (such as R134a) enters the compressor as a saturated vapor and work is done on it. This addition of energy increase the pressure and temperature of the fluid into a superheated vapor.
The superheated vapor enters the condenser and transfers heat to surrounding environment with a constant pressure. This process lowers the temperature of the fluid and makes it a saturated liquid.
3. Expansion Value
This saturated liquid enters the expansion value where its pressure drops along with its temperature again and becomes a liquid/vapor mixture.
This cooler liquid/vapor mixture enters the evaporator where it absorbs heat from the surrounding environment at a constant pressure. It’s temperature doesn’t change as all of this heat is used to change the liquid/vapor mixture state into a uniform saturated vapor state (unlike going through the condenser where some heat is used for state change and temperature reduction).
The cycle continues and the goal is met of transferring heat from a colder region to a hotter one.
Here are some charts below to better help track temperature and pressure throughout the cycle
Image Source (pressure values are arbitrary here)