In my opinion, one of the best places to live and retire is in Portugal is Cascais. Cascais is just half an hour away from Lisbon, which is the capital of Portugal. Within a radius of 50 kilometers (about 31 miles) from Cascais, you will find beaches, golf courses, castles, top class clinics, international schools, etc. You have everything that you need and want within a radius of 50 kilometers.
The Algarve is a little more spread out over a 100-kilometer (a little over 60 miles) coastline. From the Spanish border all the way to the western tip of Portugal, you will find that Algarve is divided into four centers. One of the best places to live in Algarve is Quinta do Lago, which is probably the most affluent place in the Algarve. It is for the really wealthy people, a bit like Monaco in Spain except that it is not a tax haven. Quinta do Lago has some enormous properties and so the wealthiest of the wealthy that want to retire in the Algarve would typically go to Quinta do Lago.
As you move further east, the prices come down. Vilamoura is also a very nice upmarket place to live in the Algarve. It has world-class golf courses and an excellent marina for sailors. Moving westward from Vilamoura, you will find Alvor and then Lagos, which is the last of the really nice places to live in Portugal before you get to the western tip of the country.