January isn’t a great time to be in the Algarve - it can be very, very wet. The Algarve is known for its beaches and golf rather than its history and architecture, but of your two options, Tavira has the most to offer. Lagos has a small old town, but has been swamped by development over the past 25 years. Tavira has also expanded, but to a lesser degree and is less high rise.
The western end of the Algarve is very windy which can knock degrees off how warm it feels.
Both have a good selection of cafes and restaurants.
The western end of the Algarve has cliffs and rock formations although the boat trips to the caves won’t be running. The formations can be seen well from the beaches around Carrapateira. The eastern end is less developed and has a number of towns with castles. Parking is easier in Tavira.
It won’t be beach weather. The beach in Tavira is out on the barrier island, reached by a water taxi.
If you want history, architecture and interesting sites, I would focus on the area between Lisbon and Porto - towns such as Tomar, Evora and Alcobaca.