What is the correct way to implement pushing objects away from each other?

I want two dynamic objects to bounce away from each other when they collide. It is desirable to be able to customize the range of bouncing. I chose the dynamic object because it already has the concept of weight and collision, but I don’t know how to give the desired effect (i have already tried experimenting with the parameters, but it did not bring much result).