do the trick

Mittelstufe (B1)informal

To work or solve the problem.

"A little oil on the hinge did the trick."