There were mistakes made on both sides in this hand.
Preflop
Both hands should have been folded, so this whole situation should not even have happened. There was no ante yet, so we need to play tighter than normal, because there is less dead chips to fight for. Jon Poker suggest, that J9o is an open from CO. Without ante I would say, its only an open from BTN and a fold from every other seat including SB. 42s is obviously also a fold from SB.
Flop
42s should check to the preflop aggressor. J9o should check back. A lot of hands connect with this board, so its not one, we want to be C-betting to wide. Also we have some showdown value, and we are far ahead of the hands, that will fold, like low pairs or small suited connectors. When facing a half pot C-bet, 42s should call. They clearly cant fold, when they flopped a flushdraw, and even though they have zero showdown value, I would not check-raise and run a bluff on this particular board with this particular hand.
Turn
42s should check again. J9o should bet for value after turning a straight. I would go around 60-65% pot. I dont understand, why people are talking about a half pot bet? I see a full pot bet in the replayer, and thats to large in my opinion. Its a 1-liner to a straight, and if I faced a full pot bet with a hand as strong as even top two pair, I would seriously consider folding it. Facing this sizing 42s should fold. They are not getting the right
odds to draw, and they could also be dominated by QX, JX of 9X of diamonds, in which case they are drawing dead.
River
42s made the flush on the end, and I would have donk-jammed for the last 70% pot. Its a very obvious play, but I think, its more likely, a straight check back rather than fold. J9o lose to the frontdoor flush and to AJ, and should check back now, especially after betting full pot on the turn. If J9o bet here, all worse hands will fold, and only better hands or chops will call. This is sometimes referred to as a game theory disaster bet or a value bluff, and this is something, we never want to be doing, because its very bad (quote Doug Polk).
Results
So you ended up losing to a flush, and yes that sucks. But its also a part of the game. It will happen now and then, and it can not be avoided. What can be avoided is to lose almost all your chips by overplaying your hand. So this is, what you need to focus on to improve your results.