Yes, what you said is also true but in this World cup their midfield isn't good and I also agree that there's lack of good chemistry between players of Portugal. Let's say if in the match against Spain, they somehow improve their midfield once again then they could perform better and might win that match but if they keeping doing the same things that they've done in past matches of World cup then I don't think they'll stand a chance to win against Spain.
They'll also have to make their chemistry better and they should also focus on defense as that's needed in match against a team like Spain. Let's see how they'll perform in the match against Spain, that match will decide that whether Portugal will do something in the World cup or they'll keep under performing.
Portugal will have to rely on their defense in a match against Spain because it's not easy for Portugal to control the midfield against Spain. I know in theory, Portugal have very strong midfield with Vitinha, Neves and Bruno but these players don't have good chemistry with each other so far, and it's unrealistic to think they suddenly combine together well in this big match.
Spain can control the match, have high ball possession rate but if they can not score goal, they will have problems with Portugal that will likely use counter attacking tactic in this match. They have Ronaldo, Leao who can play very well with counter attacks. In UEFA Nations League final match, Portugal won against Spain.
Having good chemistry is really what Portugal lack in this world cup. Right from the start they have been struggling with performance not because they don't have quality players enough but because they don't have good understanding and communication among themselves that's why they are struggling.
They have one of the best midfield combination in the Tournament. Vitinha and Neves are the best duo in the champions league while Bruno Fernandes won premier league best player last season but still they are still not able to show anything. Against Spain they need to communicate well if not they will struggle. Spain also has a good midfield so it will be an interesting battle in the middle of Portugal midfield trio improve.
The match will interesting, especially since Portugal won against Spain in the their last meeting in the Nations League final.