Fish Don't Literally Lock Mouths
Fish lack lips, so they cannot lock mouths like mammals. What you may be seeing is spawning behavior, territorial fighting, feeding, or social interaction that looks similar.
What to Observe
Consider the species, context, and frequency of the behavior. If you are concerned, consult an experienced aquarist or veterinarian.