I found @Anil kumar comment useful so I have posted it as an answer.
add the tailwind justify-center
utility class to the container that has the flex class like this:
<div class="flex justify-center">
<div>content</div>
</div>
and the content will be centered.
https://tailwindcss.com/docs/justify-content
https://css-tricks.com/almanac/properties/j/justify-content/