Krishna speaks8.12

सर्वद्वाराणि संयम्य मनो हृदि निरुध्य च।मूर्ध्न्याधायात्मनः प्राणमास्थितो योगधारणाम्॥

sarva-dvārāṇi sanyamya mano hṛdi nirudhya camūrdhnyādhāyātmanaḥ prāṇam āsthito yoga-dhāraṇām

Word by word
sarva-dvārāṇi — all gatessanyamya — restrainingmanaḥ — the mindhṛdi — in the heart regionnirudhya — confiningca — andmūrdhni — in the headādhāya — establishātmanaḥ — of the selfprāṇam — the life breathāsthitaḥ — situated (in)yoga-dhāraṇām — the yogic concentration

The verse says

Closing all the gates, holding the mind in the heart, drawing the breath up into the head, settled in the hold of yoga —

In plain words

The gates are the senses. Five ways in, deliberately shut.

This is not disgust at the world. It is what anyone does when something needs their whole attention.

What is unusual is only the thoroughness.

Where you've felt this · in study

Before sitting down to a piece of work you have been avoiding for a week, you put your phone in the next room, shut the door and turn the desk to face the wall. None of that is the work. It is what makes the work possible for somebody honest enough to admit how easily distracted they are.

Going deeper

Shutting the senses has a bad reputation it does not entirely deserve.

It sounds like a rejection of the world, and in some traditions it is. Here it reads more like preparation. The senses are described as gates, which is a neutral word — gates are not walls, and a gate that closes can open. Chapter 2 used a different image for the same thing, a tortoise drawing in its limbs, and the tortoise does not stay in.

The point is that attention is finite. Whatever is coming in through five doors is not available for anything else.

Most people already know this in a small way. You turn the radio down when looking for an address. This verse describes the same instinct, followed all the way to the end by people who had decided it was worth doing properly.