In the name of Allah, the most gracious, the ever merciful. Salam my brothers and sisters, may the blessings of Allah be on us and the Ummah. My question was that, Allah the almighty does not expose sins, but at times he exposes sins, he knows the best reason for exposing sins. But does it mean that if one's sins are exposed he won't get forgiveness? or he won't be loved by Allah ever again? Does it mean something like that?
All Praise to Allah Subhan o Taala and blessings on Prophet Muhammad peace be upon him His family and companions
Wa'lekumussalam warahmatullah brother,
Narrated Safwan bin Muhriz: A man asked Ibn `Umar, "What did you hear Allah's Messenger (ﷺ) saying regarding An-Najwa (secret talk between Allah and His believing worshipper on the Day of Judgment)?" He said, "(The Prophet (ﷺ) said), "One of you will come close to his Lord till He will shelter him in His screen and say: Did you commit such-and-such sin? He will say, 'Yes.' Then Allah will say: Did you commit such and such sin? He will say, 'Yes.' So Allah will make him confess (all his sins) and He will say, 'I screened them (your sins) for you in the world, and today I forgive them for you."(Bukhari)
Allah Swt does not expose sins indeed he dislikes this act of exposing sins of oneself or His brother in Islam.When someone openly shares his sins with others and continuing it gradually the fear of committing sin disappears in people hearts and in this way people do not feel shame in bringing such words to their mouth.
Abu Hurairah (May Allah be pleased with him) reported: Messenger of Allah (ﷺ) said, "Every one of my followers will be forgiven except those who expose (openly) their wrongdoings. An example of this is that of a man who commits a sin at night which Allah has covered for him, and in the morning, he would say (to people): "I committed such and such sin last night,' while Allah had kept it a secret. During the night Allah has covered it up but in the morning he tears up the cover provided by Allah Himself." [Al-Bukhari and Muslim].
The cause of exposure of sin is a tongue of a person by which he could tell his sin to others or expose sin of others which is not allowed in Islam and nowadays its also common on social media where people use to expose their sins by writing and sharing with others which is a more bigger sin itself.
It was narrated from Abu Hurairah that the Messenger of Allah (ﷺ) said: “Whoever covers (the sin of) a Muslim, Allah will cover him (his sin) in this world and in the Hereafter.”(Ibn-Majah)
and as you asked about forgiveness so Allah Swt is ever forgiving when one asks forgiveness and do repentance Allah Swt forgives him as His mercy prevails over his wrath.
Anas bin Malik narrated that the Messenger of Allah (ﷺ) said: “Allah, Blessed is He and Most High, said: ‘O son of Adam! Verily as long as you called upon Me and hoped in Me, I forgave you, despite whatever may have occurred from you, and I did not mind. O son of Adam! Were your sins to reach the clouds of the sky, then you sought forgiveness from Me, I would forgive you, and I would not mind. So son of Adam! If you came to me with sins nearly as great as the earth, and then you met Me not associating anything with Me, I would come to you with forgiveness nearly as great as it.’”(Tirmidhi)
Allah Swt and His Messenger knows best.