Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:63:3

That is because they believed, and then they disbelieved; so their hearts were sealed over, and they do not understand.  

That, namely, their evil deed, is because they believed, by ˹affirming faith only with˺ the tongue, then disbelieved, in ˹their˺ hearts, that is to say, they persist in harbouring disbelief in it; therefore their hearts have been stamped, sealed, with disbelief. Hence they do not understand, faith.
القرآن:٦٣:٣

ذَٰلِكَ بِأَنَّهُمْ آمَنُوا ثُمَّ كَفَرُوا فَطُبِعَ عَلَىٰ قُلُوبِهِمْ فَهُمْ لَا يَفْقَهُونَ  

{ذلك} أي سوء عملهم {بأنهم آمنوا} باللسان {ثم كفروا} بالقلب، أي استمروا على كفرهم به {فطبع} ختم {على قلوبهم} بالكفر {فهم لا يفقهون} الإيمان.

See similar narrations below:

Collected by Qurʾān
quran:9:87

They were satisfied to be with those who stay behind, and their hearts were sealed over, so they do not understand.  

They are content to be with those who stay behind (khawālif is the plural of khālifa, meaning the women who ‘stay behind’ ˹takhallafna˺ at home) and a seal has been set upon their hearts, so they do not understand, ˹what is˺ good.
القرآن:٩:٨٧

رَضُوا بِأَنْ يَكُونُوا مَعَ الْخَوَالِفِ وَطُبِعَ عَلَىٰ قُلُوبِهِمْ فَهُمْ لَا يَفْقَهُونَ  

{رضوا بأن يكونوا مع الخوالف} جمع خالفة أي النساء اللاتي تخلَّفن في البيوت {وطبع على قلوبهم فهم لا يفقهون} الخير.