Handbrake has lots of settings, some being quite hefty variants of H.264. The default isn’t a great setting, and I always make sure I set it to a constant frame rate that matches the source (23.976fps or 24fps)
I really like Media Encoder, which is part of Adobe’s suite. There’s also Compressor (part of the Final Cut suite) and a few others. It partially depends on what you edit with and what will integrate best with that. DaVinci Resolve is also really powerful at transcoding, and has a built-in NLE (it was originally just a colouring app, not it’s quite expansive).