You need to bet enough to deny good pot odds
to anyone who wants to chase a flush draw. If somebody has four cards to a flush with the turn and river yet to come, their odds of hitting a flush by the river are 1.9 : 1. You should bet an amount that gives them only 1.5 : 1 pot odds
or less, for example, so that even if they call and do hit the flush they are making a mistake. If they keep making these kinds of calls they will lose money in the long run. It's not about the outcome of this specific hand, it's about whether or not the players are making good decisions.
There's no way you should check and give a free turn card, this is a huge mistake.
There usually needs to be more information taken into account in these types of hands, such as position, pre-flop betting/raising patterns, stack sizes, how many people are in the pot post-flop, etc. In some situations, the only correct thing to do if you think you have the best hand post-flop is to shove and make everyone else pay the max to chase their draws.