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:16:106

Whoever disbelieves in Allah after his belief... except for one who is forced ˹to renounce his religion˺ while his heart is secure in faith. But those who ˹willingly˺ open their breasts to disbelief, upon them is wrath from Allah, and for them is a great punishment;  

Whoever disbelieves in God after ˹having affirmed˺ his faith — except for him who is compelled, to pronounce ˹a statement of˺ unbelief and so pronounces it, while his heart is at rest in faith (man, ‘whoever’, is ˹either˺ a subject or a conditional, and so the predicate ˹of this subject˺, or the response ˹to this conditional˺, is ˹an implied˺ lahum wa‘īdun shadīd, ‘there is for them a severe threat ˹of chastisement˺’; this is indicated by ˹the statement that follows˺) — but he who opens up his breast to unbelief, that is, ˹he who˺ opens it up and expands it ˹with unbelief˺, meaning that his soul is content with it, upon such shall be wrath from God, and there is a great chastisement for them.
القرآن:١٦:١٠٦

مَنْ كَفَرَ بِاللَّهِ مِنْ بَعْدِ إِيمَانِهِ إِلَّا مَنْ أُكْرِهَ وَقَلْبُهُ مُطْمَئِنٌّ بِالْإِيمَانِ وَلَٰكِنْ مَنْ شَرَحَ بِالْكُفْرِ صَدْرًا فَعَلَيْهِمْ غَضَبٌ مِنَ اللَّهِ وَلَهُمْ عَذَابٌ عَظِيمٌ  

{من كفر بالله من بعد إيمانه إلا من أكره} على التلفظ بالكفر فتلفظ به {وقلبه مطمئن بالإيمان} ومن مبتدأ أو شرطية والخبر أو الجواب لهم وعيد شديد دل على هذا {ولكن من شرح بالكفر صدرا} له أي فتحه ووسعه بمعنى طابت به نفسه {فعليهم غضب من الله ولهم عذاب عظيم}.