Racing an oncoming boat to be first through a bridge is rarely productive - you will probably both have to stop, or worse, you will crash. Much more relaxing to give way and signal the other boat to come through. You’ll soon learn to judge who is nearest the bridge and thus has priority!
Alternatively, use the rule that the boat nearest the towing path, and therefore with the deepest water, gives way. On rivers and canals with a current, boats travelling upstream should give way to those coming downstream.