How to properly mirror weight paints onto bones?

Whenever I try to mirror the weight paints on my model it’s mirroring on the same bone instead of the one on the opposite side. For example when I move a finger on one side it moves the finger on the other side. How do I fix this?

Use appropriate names for your bones + vertex groups, such that mirrored bones have the exact same name, other than a .L or .R suffix indicating which side of the model.