Spawning healthbar with the correct orientation

Hi. I am new to Unity and the forum, so sorry if I’ve made any error with formatting questions.

I am currently trying to add a healthbar to the enemies in my game, but for some reason I am not able to spawn it with the correct orientation. I am only including one image for the problem case since I am new, but the goal is so that it is completely parallel to the ground, but right now it’s entirely perpendicular, as shown here

Weixin Screenshot_20241010112323

The code to instantiate the healthbar is
healthBarInstance = Instantiate(healthBarPrefab, transform.position + Vector3.up * 2, Quaternion.identity);

I’ve tried different values for the rotation parameter and tweaking the canvas object in different ways but the problem persists and I’ve been stuck on this part for way longer than I would like. Your help is greatly appreciated, and let me know if you need any more information.

Thank you

Bumping this up since no one has answered

Managed to get a solution on reddit.
healthBarInstance = Instantiate(healthBarPrefab, transform.position + Vector3.up * 2, healthBarPrefab.transform.rotation);