Asalamualikum sheikh, I heard it's haram if someone doesn't advice someone when they see them doing something haram. Is that true? What if someone is simply just too shy to approach them thats why he doesn't advice some people? I think sheikh Saleh al fawzan said its haram.

Ustadh AbdulAziz al-Haqqan
This is a general ruling, though, without the context. This is governed by certain criteria that have to be met: 1. There isn't greater evil or harm that's going to result from it. 2. You are actually able to change that which is forbidden by advising, talking, and so on. Shyness is something that is blameworthy when it deprives you from seeking knowledge or advising others. So, if you are capable, you should advise people as long as it doesn't cause something that is a greater evil or harm.