The Algarve is my default beach destination (May, June or September). I have also been in October and February/March - now at this time of year, I head to Fuerteventura in the Canaries, as the weather is better than Portugal. The sea is cold, even in summer as it’s the Atlantic not the Med.
I have had torrential rain (and some sunshine!) in Lagos in October. Due to the wind at the western end of the Algarve, October onwards is marginal for beach time. You will need warm layers for the evenings into November.
From Lagos by car, you can easily visit the gorgeous beaches up the west coast backed by amazing cliffs around Carrapateira. There aren’t as many places to see north of here until you get close to Comporta near Lisbon.
A trip to Monchique and Foia in the hills is nice if you pick a day with decent weather. It is cold and windy up there, so wear warm layers. Sagres is always windy and cooler.
Other than golf and beaches, compared to other regions of Portugal, the Algarve has far less to offer and more modern development. In the winter, I would spend longer exploring between Porto and Lisbon and have a week maximum in the Algarve.
I haven’t been to Beja, but I know a Portuguese couple from the Algarve who used to head there when they wanted some “city life” (35,000 population!) and another Portuguese friend said why go all that way as there’s nothing there - it’s just a regular town.
Make sure your car has a transponder for the tolls. Whenever I have taken a Portuguese hire car into Spain, I have been charged extra - notify your rental company, otherwise the insurance is invalidated. If you have cover for Spain, petrol in Spain is considerably cheaper than in Portugal, so whilst in Tavira, head across the bridge and fill up and have lunch in Ayemonte.