Suppose West plays in 4H. (This is a difficult contract to reach, but is the only makable game.)
North will lead the SA, and may well switch to a club at trick 2.
You win the CA. You certainly have at least 10 winners, so your whole focus has to be on avoiding more than 2 further losers and on ensuring an entry to your winners. Assuming trumps are 3-2 (and you have no chance if they are not), you need to cash 2 top trumps, and then play diamonds until the defender with the remaining trump ruffs.
The defence can cash a club, but Dummy's third trump will stop any further black suit losers and will give the entry to the remaining diamond winners. 10 tricks made.
If North continues with a second spade rather than a club at trick 2, you need to ruff in Dummy, which takes away your ruffing entry to Dummy. But now you retain the CA to avoid club losers, so the play after taking two top trumps is to lead a third trump.
The defence can take another spade trick, but Declarer can then ruff a further spade and enter Dummy with the diamonds.