Playing in NT by south needing 4 more tricks cashes the top spade.
If West throws a heart, dummy can also throw a heart and then exiting a heart leads to whoever wins the second heart to be endplayed (actually you can still always make 4 tricks if dummy throws a diamond). So assume West throws a diamond. Dummy now throws a diamond (the 9 for style points) to prevent the defense from being able to untangle their 3 heart tricks. Now exit a heart. If West wins the second heart, he either has to let dummy win a heart or to play a diamond allowing 3 diamond tricks. If East wins the second heart, he is endplayed. However, because West has been forced to throw a diamond from Txx, the ploy of returning the queen doesn't work as the ten is now dropping in 2 rounds.