Obviously both matter. But if you look at all the successful teams over the years, most were a good balance of ability in attack and defense; some of them were only just above average in attack but defensively very solid; very few had a weak defense and simply outscored the opposition. That last approach is by far the most difficult way to win a trophy.
This idea is even more important in a knockout tournament. You can win a whole tournament without winning a single game in regular time or, in in theory, without even having a single shot on target. Set pieces, own goals, penalties can provide all the goals you need to win. The longer you go without conceding, the more desperate your opponent may become - and they will take chances and make mistakes you can exploit. Sometimes you can lose matches and still progress, depending on the tournament format. As long as you know your team is very unlikely to concede, you're still in it.
That approach makes for a grim spectacle, but it is effective and every coach in a knockout tournament knows that. Mourinho is, or at least was, a past master at this sort of thing. Italia '90 is a classic example of teams playing with this mindset.