Hi,
if it is a 3D object, then you need to make a cube in Blender or any other 3d software and set the pivot point on 1 side.
the standard cube has the pivot centered wich makes it difficult to do the scaling.
to calculate the % (set between 0 and 1) use a float operator and set in Float 1 the Current Heath.
Then in Float 2 the Total Health and Divide.
now you have a result between 0 and 1
You can use that to set the scale.
if you wold use a UI Image you can also use UI Image Set Fill Amount.