Merging Contacts with Same Phone Number

We do have the Operations Hub, but I do not know how to custom code and I couldn’t find examples of someone doing this. Also, we have a pretty large database so Insycle would be pretty expensive and we do not need all the features it provides.

What actions would you use to make this work?