We are just now having our first ‘cold wave’ in the Lisbon area but that’s a relative term. My weather app says it will remain cold for the next ten days or so. The highs are around 59 with lows mostly mid to low 40’s. Porto will be cooler and the Algarve a bit warmer. As others have written, layering is your best bet. A rain coat/wind breaker type coat is usually all you need. I actually purchased a heavier winter coat while in Germany a few years ago and have yet to wear it when I’m home in Cascais. You don’t need wool sweaters or pants, IMO.
Regarding heat in accommodations. Hotels will have heat. It’s the apartment rentals that might be a problem. If it’s a newer building, it will likely have mini-splits or radiator type heating. If older building, maybe not. But, the older apartments will likely have doors to every room. They will likely have some type of room heater, lots of times an oil radiator. Close the doors to the room you will be in and the oil radiator will warm the room. Not quickly but they work quite well. I remember a trip to Porto a few years ago in February. The apartment was so cold when we got there, we almost checked into a hotel. But, we gave the oil radiators a few hours and the place was nice and toasty!
Enjoy your trip. Tourists are fewer, the skies are very clear and every town will have lovely Christmas decorating.