Did you have any reads on the UTG player? You should have -- he was super loose. So your 3bet pre makes sense for value, since he was raising trash from all positions. But you need to 3bet more. You're giving the BTN odds to call with a wide range of hands. If you 3bet to .60 or more, you would have probably pushed him out.

On the flop. you hit your hand -- why did you check? Do not slowplay hands at 5NL, especially against unknowns.

On the turn -- why did you bet so small? If you think you have the best hand here, bet much bigger.