Verses 48 and 116 of Surah An-Nisa start with the same concept.
“God does not forgive the sin of considering others equal to Him, but He may choose to forgive other sins. Whoever believes in other gods besides Him has indulged in a great sin,” reads verse 48. So God may forgive all sins except associating others with Allah. This has also resonated in other verses such as verse 13 of Surah Luqman which reads “Luqman advised his son telling him, ‘My son, do not consider anything equal to God, for it is the greatest injustice’.”
Verse 48 of Surah An-Nisa is among the most promising verses of the Quran as it assures believers of the mercy of God and tells them that their sins can be forgiven. Disappointment is a dangerous issue and it should never occur to a believer.
Various verses have pointed to the required tools for the forgiveness of sins and the most important toll here is Tawbah (repentance). Tawbah means that one changes his/her real and practical intention to commit a sin, promises not to commit it in the future, and compensates for his/her past sins if possible.
Verse 116 of Surah An-Nisa also points to a roughly same concept: “God will not forgive the sin of considering something equal to Him, but He may forgive the other sins of whomever He wants. One who considers anything equal to God has certainly gone far away from the right path.”
Interpreters believe that verse 48 point to Shirk (associating others with God) as a great sin while verse 116 refer to the irrecoverable nature of this sin.