head to head
X4: Foundations asks more than Portal, and the gap is variance.

Optimization · Pure Optimization
The portal-gun puzzle game whose solutions are everything.

Optimization · Pure Optimization
Open-ended space simulation of trading, station-building and faction warfare.
Portal leans Optimization (Pure Optimization); X4: Foundations leans Optimization (Pure Optimization).
Portal leans a little harder on execution, though the gap is small.
Portal
Portal placement timing modest.
X4: Foundations
Flying your own ship matters early, fleets later.
Same score on reads - which means the number cannot separate them. The difference is in what each one asks of you.
Portal
No adversary modeling player.
X4: Foundations
AI factions follow mappable economic logic.
X4: Foundations leans clearly harder on variance.
Portal
Deterministic chambers; no randomness.
X4: Foundations
Simulated wars create some unpredictability.
X4: Foundations leans clearly harder on optimization.
Portal
Pure puzzle-solving optimization.
X4: Foundations
Station logistics and empire economics are a pure engine problem.
A matching score does not mean a matching test. Two games can both sit at 10 on execution and demand completely different things of you - which is why the reasoning above matters more than the number beside it.