There doesn’t appear to be much ruffing possible in this hand (one club in hand and one diamond in the dummy) so it looks as if drawing the trumps is a good idea. We are missing the ♥A and ♥Q but we have good intermediate hearts (the ♥1098 etc.) so the hope with this suit is to avoid losing a trick to the ♥Q. In this case we kind of ‘ignore’ the missing ♥A as this is a definite loser and we just focus on the ♥Q. It is best to finesse for the missing Queen so we need to get the lead to the dummy to enable this finesse.
So, lose the first two club tricks and then ruff the third in hand. Cross to the ♦K on the dummy and lead the ♥J from there, hoping for South to hold the missing ♥Q. If South ducks this ♥J then we also duck, running it round to North. If instead South covers the ♥J with the ♥Q then we also cover with our ♥K and we will only now lose to the Ace in this suit. Given that South actually has the ♥Q this finesse will be successful, either immediately (if South covers) or on the next round (if South ducks). If South does duck, which is their best bet, then we will need to cross back to dummy with a low spade to either the ♠Q or ♠J and then repeat the finesse in trumps. Once we have drawn the trumps (given the friendly 3-2 break there it is straight-forward) we can then simply enjoy our spade tricks and we end up losing only 3 tricks – 1 heart and 2 clubs.
If North had the ♥Q then the finesse there would have failed, but as long as trumps are not breaking badly we will still comfortably make our contract, making 9 tricks with a failing heart finesse and 10 with a successful one (as above). Whilst we did make enough tricks to make game in hearts, bidding it wouldn’t have been a good idea because we require hearts breaking 3-2 (~68% chance) and a successful finesse (50% chance). Combining these gives us only a ~34% chance of making game, so playing in 2♥ was the right decision in the bidding.