Is blocking certain people while allowing everybody else to view some content discrimination
and violate anti-discrimination laws
Probably not, at least in the US.
There is no federal law prohibiting "discrimination" in general. There are specific laws regarding discrimination against certain groups in certain contexts. They would probably not apply to an individual determining who is allowed to view their social media posts.
That said, there are some specific contexts where this might be illegal. They would generally involve non-personal use of the account. The courts recently ruled that Donald Trump may not block people on his Twitter account, because he's using it in an official presidential capacity rather than just his individual capacity. Also, racial discrimination in housing is illegal, so if you're selling your house and you block all black people from viewing your house photos, that would probably be illegal as well.
Also is not being able to consume information available on a public platform a violation against right to freedom.
I'm not sure what you think a "right to freedom" would entail. But I don't think you have the right to demand that a person allow you to access their social media accounts.