I agree with you. For a team to win, all players need to play well. For a team to win, everyone has to play well, both batting and bowling. If everyone plays well then the match can be won very easily. Pakistan players couldn't do that. I think Pakistan team has very good players. After that they could not win the match. If all the players of Pakistan had played well then they could have won the match.
Pakistan is very unlucky that they lost this match. At the beginning of the match, the match was controlled by Pakistan. Sri Lanka managed to score 67 runs in the first 10 overs. But with the help of Rajapaksa's unbeaten innings of 71 runs, Sri Lanka set a target of 171 runs in 20 overs. But if Babar Azam and Fakhar Zaman play well, Pakistan could have won. But these two batsmen could not play well.
I do not think Pakistan was unlucky. I think they had no clue or plan on how to win against Srilanka. They also underestimated the Srilankan batters after winning the toss and initially putting pressure on them. Bhanuka Rajapaksa played brilliantly yesterday as it was a pressure match. Babar Azam is out of form and this might not go well with Pakistan in the T20WC.