Śrīmad-Bhāgavatam · Text 10.1.42
Who is speaking and story frame
यतो यतो धावति दैवचोदितंमनो विकारात्मकमाप पञ्चसु । गुणेषु मायारचितेषु देह्यसौप्रपद्यमान: सह तेन जायते ॥ ४२ ॥
yato yato dhāvati daiva-coditaṁ
mano vikārātmakam āpa pañcasu
guṇeṣu māyā-raciteṣu dehy asau
prapadyamānaḥ saha tena jāyate
At the time of death, according to the thinking, feeling and willing of the mind, which is involved in fruitive activities, one receives a particular body. In other words, the body develops according to the activities of the mind. Changes of body are due to the flickering of the mind, for otherwise the soul could remain in its original, spiritual body.
Read Śrīla Prabhupāda's purport on Vedabase.io