I know a couple of founders who have made significant wealth and they mentor me. I post this on LinkedIn and WhatsApp. I also try to show a good picture of life (giving a good impression about life.) My coworkers specially the HR head reads my posts and said that I am showing off. I apologized and have since removed the posts. Since then he hasn't been talking at all and has been spying on me using different coworkers and blaming that I don't work well. I have been very polite and tried to talk to him again and again at several points but he ignores and just walks away. What should I do?
Assuming you are really telling us the truth and your performance is good, but the head of HR is badmouthing you anyway.
You don't have much of a choice. You need to find yourself a new employer as soon as possible.
The head of HR has a lot of power. He can block all your avenues of advancement and potentially can even get you fired.
And trying to gain the approval of someone who disrespects you and lies about your performance because he doesn't like you, that's only going to make things worse for yourself in the long-run.
You need to leave as soon as possible. Until then, be the perfect employee, do not do anything controversial, do not stand out.
Speak to those "founders" that you know.
(Unclear to me if you mean the founders of your company or other companies)
Ask them what to do, as they are closer to your situation than we are.
@Stephan Branczyk is correct that the head of HR generally wields great power within a company and that power often extends beyond the company you're currently working for.
You made the right first move by apologizing and removing... plan your next step carefully.