You raise to $6 with two hearts and the big blind calls. The small blind folds its $1.
Two hearts land, so you have four hearts and need one more. Your opponent checks, you bet $8 and they call.
A blank. They check and so do you, which gives you a free look at the last card.
The queen of hearts makes your flush. They check, you bet $20, they call, and your ace-high flush wins.