You can do this by applying the mx-auto
class
<img className='object-cover h-20 w-35 mx-auto' src='/sampa.png' alt='logo' />
It calculates the horizontal margins (margin-left and margin-right) automatically, and centers the element within its parent container.