There is a path and a practice for giving up the five lower fetters. It’s not possible to know or see or give up the five lower fetters without relying on that path and that practice. Suppose there was a large tree standing with heartwood. It’s not possible to cut out the heartwood without having cut through the bark and the softwood. In the same way, there is a path and a practice for giving up the five lower fetters. It’s not possible to know or see or give up the five lower fetters without relying on that path and that practice.
But it is possible to know and see and give up the five lower fetters by relying on that path and that practice.
Suppose there was a large tree standing with heartwood. It is possible to cut out the heartwood after having cut through the bark and the softwood. In the same way, there is a path and a practice for giving up the five lower fetters. It is possible to know and see and give up the five lower fetters by relying on that path and that practice. Suppose the river Ganges was full to the brim so a crow could drink from it. Then along comes a feeble person, who thinks: ‘By swimming with my arms I’ll safely cross over to the far shore of the Ganges.’ But they’re not able to do so. In the same way, when the Dhamma is being taught for the cessation of substantialist view, someone whose mind isn’t secure, confident, settled, and decided should be regarded as being like that feeble person. Suppose the river Ganges was full to the brim so a crow could drink from it. Then along comes a strong person, who thinks: ‘By swimming with my arms I’ll safely cross over to the far shore of the Ganges.’ And they are able to do so.
In the same way, when the Dhamma is being taught for the cessation of substantialist view, someone whose mind is secure, confident, settled, and decided should be regarded as being like that strong person.
And what, Ānanda, is the path and the practice for giving up the five lower fetters? It’s when a mendicant—due to the seclusion from attachments, the giving up of unskillful qualities, and the complete settling of physical discomforts—quite secluded from sensual pleasures, secluded from unskillful qualities, enters and remains in the first absorption, which has the rapture and bliss born of seclusion, while placing the mind and keeping it connected. They contemplate the phenomena there—included in form, feeling, perception, choices, and consciousness—as impermanent, as suffering, as diseased, as a boil, as a dart, as misery, as an affliction, as alien, as falling apart, as empty, as not-self. They turn their mind away from those things, and apply it to the element free of death: ‘This is peaceful; this is sublime—that is, the stilling of all activities, the letting go of all attachments, the ending of craving, fading away, cessation, extinguishment.’ Abiding in that they attain the ending of defilements. If they don’t attain the ending of defilements, with the ending of the five lower fetters they’re reborn spontaneously, because of their passion and love for that meditation. They are extinguished there, and are not liable to return from that world. This is the path and the practice for giving up the five lower fetters.
MN64
At the end is your requested thing, but clearly to not contradict with the above, it means that
“Sir, if this is the path and the practice for giving up the five lower fetters, how come some mendicants here are released in heart while others are released by wisdom?”
See this 2 suttas to compare released by wisdom vs released both ways:
https://suttacentral.net/an9.44/en/sujato?lang=en&layout=linebyline&reference=none¬es=none&highlight=false&script=latin
https://suttacentral.net/an9.45/en/sujato?lang=en&layout=linebyline&reference=none¬es=none&highlight=false&script=latin