When a compressor fails, the system usually needs more than a compressor. Metal debris circulates through the condenser and the expansion valve, so a receiver drier and often a condenser go with the job. The product descriptions note whether a kit includes those parts.
Refrigerant type matters. R134a and R1234yf systems use different oils and different service fittings, and they are not interchangeable.