If you use your left hand, what you need to do is simple:
replace the JSON files inside the assets → minecraft → items folder with the ones from the (L)Hand folder.

It’s written in Java selector code.
If you can’t figure it out, just search for it in your browser.