Dear Roshni,
HR will have to have a good relationship with all the departments in an organization. Firstly, people from various departments are recruited by HR, which means it starts with finding out what the department is all about, how it functions, and what kind of resources are needed. In Core HR operations, HR also needs to connect with other departments for payroll, leaves, confirmation, rewards, and recognition, etc.
I would like to conclude by saying that HR is one which builds and binds with the other departments and continuously works with them to achieve the company's goals and objectives.
Do let me know if you want more clarity.
Regards,
Renu