The best way to reach Malaga (Spain) from Algarve, is by Private Transfer.
From Algarve, you can request pickup at your hotel/accommodation front door, or airport, with your luggage, directly to your destination in Spain, without the hassle of public transportation and crowds.
Any destination place in the Malaga can be covered.
There are three options to consider:
OPTION #1: Direct Transfer (Private), no stops (by LisbonGuide / Concierge Portugal): https://lisbonguide.org/private-transfers-portugal/
OPTION #2: Private Transfer, by Portugal Magik Tours: https://portugal-magik.com/tour/private-transfer-from-algarve-to-malaga-spain/
OPTION #3: Car + Driver at your disposal with Portugal Magik (Ideally for multiple days): https://portugal-magik.com/tour/driver-portugal/
You can also follow here this app, for instant quotation and booking: https://lisbon.ridebitsapp.com/central/new_reservation
Enjoy Algarve and Malaga. Make sure to travel in comfort and safety.