While inspecting the site, I noticed that the body does not extend to 100% width of the screen when I reduce the size of the site.
After removing the Bootstrap classes, the issue seems to be resolved. I even tried adding body{width: 100%}
but it did not have any effect. Interestingly, when I removed 'p-md-4' from the classes, the gap became slightly smaller.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="84e6ebebf0f7f0f6e5f4c4b1aab6aab7">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<header class=" row align-items-center bg-primary">
<div class="col-md-3 col-sm-6 col-12 mt-md-0 mt-0 p-md-4 ms-md-2 ms-3 p-3">
test
</div>
</header>