How many days on a 14 day trip would you spend in Porto? In Lisbon? What things would you recommend doing in each city to get a good sense of the local culture?
I would recommend buying Rick Steve's Portugal guide book and taking a look at what attractions in each city appeal to you. Also look at any side trips he lists from each and also check Viator and Get Your Guide to see if any tours are interesting. That should help you determine how much time you need.
I did buy Rick's book and he seems to say you can do Porto in one long day or two days. However, other books seem to indicate it's a major place to visit. Also there are side trips up the Duoro river or to places which are not mentioned in RS book at all. This is why I buy RS but also other lines, and then try to extrapolate. I used to assume RS had reviewed all the options and had curated the choices. And on the other hand other books seem to have too many choices. There are also YT videos.
I watched more YT videos recently, and one American guy who spend a month in Portugal said to do it again he would spend 25 days in Porto and just a few in Lisbon. Other travelers make them more balanced. Maybe speak glowingly of the cruise up the river and spending a night then returning. There are also outlying cities that can be done on a day trip which are not mentioned in RS books. I don't think I have seen anyone say that Porto is substandard destination that only should be a day.
We spent three nights in Porto last year and for what we did that was enough time. I’m sure we could have filled another day without too much trouble if we had wanted to.
Too get "a good sense of local culture" you need much more than a few days. I have broad interests and I can spend a month in the Lisbon area and not run out of interesting things to do. If you just want to see the famous sites, three days is enough, but if you want to get to know Lisbon, I recommend at least a week if not more. There are many semi-hidden gems there, but it takes some time to sniff them out.
To get more specific advice provide some detail about your interests and traveling style.