Yama defines the ethical prerequisites for realization. Knowledge alone is insufficient if the seeker has not abandoned unethical conduct, mastered their senses, and achieved a state of inner tranquility and mental focus. Without these moral and meditative foundations, the Atman remains hidden.
Sanskrit Verse
नाविरतो दुश्चरितान्नाशान्तो नासमाहितः ।
नाशान्तमानसो वापि प्रज्ञानेनैनमाप्नुयात् ॥ २४ ॥
Transliteration
nāvirato duścaritānnāśānto nāsamāhitaḥ |
nāśāntamānaso vāpi prajñānenainamāpnuyāt || 24 ||
Translation
None who has not turned away from bad conducts whose senses are not under control, whose mind is not collected, or whose mind is not at rest, can attain this atman by knowledge.

Muni's Play