If I see someone sinning for example, committing shirk. Am I obligated to tell them? I have heard that we should conceal the sins of each other. But I also heard that if we see someone sinning we should tell them because it’s advising them to do good. If I do not inform them of their sin is that haram? I am very confused.
Allaah Azza Wa Jalla says in al-Qur'aan (interpretation of the meaning):
"And let there be [arising] from you a nation inviting to [all that is] good, enjoining what is right and forbidding what is wrong, and those will be the successful."
It was also narrated in an authentic hadith:
"[...] I heard the Messenger of Allah as saying: He who amongst you sees something abominable should modify it with the help of his hand; and if he has not strength enough to do it, then he should do it with his tongue, and if he has not strength enough to do it, (even) then he should (abhor it) from his heart, and that is the least of faith."
Sahih Muslim, 49a (https://muflihun.com/muslim/1/79)
If the person is an outwardly righteous Muslim and does not openly commit sin, you should - in general - conceal his sin in front of others, but it is mandatory upon every Muslim to correct a person who commits sin, and give him sincere advice .
And Allaah Azza Wa Jalla knows best.