I think you need to get your preflop game fixed first. There ought to be a guideline somewhere in this forum what you should open from what postion.
99 you should open from any position.
Most of the hands you want to play, you should raise preflop and follow up on most flops.
So limping behind is the first huge mistake in that hand.

Flop... raise. Don't ever try to trap at microstakes. Bet when you have a hand, fold if you don't. At 2NL that's all you need to do.

Same thing on the turn.

River: never ever call that bet. If he doesn't have a flush, then he misplayed a set. This is pretty much always a value shove, not a bluff.

You could not have played that hand any worse. Get your opening requirements straight. Make a plan for each hand. Don't call an all-in for 3x the pot with 2nd pair.