How should I proceed when a push fails because I'm behind ?

When you try to push your commit while another commit happened in that time git tells you that the push failed and that you should use git pull and then push again.

My problem is that by doing that 2 commits get pushed from me, one that has my original commit and one that just says that I merged with main. I don't like that all and would rather have only one commit. I don't really see the point of having an extra commit that just tells that I merged with main. What do I do in this situation ?