See this demo and the code pasted below.
See how there is red padding above and below the text?
<div class="row">
<div class="col-md-6 text-right">
<img src="https://images.unsplash.com/photo-1565893542669-5c3a75107dc9?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80" alt="couple" class="img-responsive" style="max-width: 400px;">
</div>
<div class="col-md-6 text-left">
<h2 style="background: red; padding: 0; background: red; padding-top: 0; margin-top: 0;">
TEXT
</h2>
</div>
</div>
I'm using Bootstrap but am not sure that it's related to the cause.
The answers at How can I remove space (margin) above HTML header? neither explained nor solved my problem here. For example, the main answers suggest setting margin to 0, which I've already done.