First of all, understand that HR is not a line function. In manufacturing, production is the line; in IT or ITES, it's the timely completion of projects; in banks, it's customer service; and in railways, it's the punctual running of trains. These are the line functions, and your job is to support and align your role for the success of the line.
Read labor laws and understand people's behavior. Learn to distinguish yourself from your boss and keep him informed of the environment so he can make the right decisions. There are many more aspects to consider. You may read some of my blogs for additional information and ideas. Feel free to ask me as well.
I have more than sixty blogs on the following page. Feel welcome to view and review:
https://rasikbhaikannan.blogspot.in/
Best wishes,
Rasikbhai Kannan