How to determine which side of an object a raycast has hit?

Is it possible to determine which side of a GameObject a raycast has just hit?

I wan’t to do this becasue I wan’t you to be able to click a surface in a 3D world, and an object will be placed on that surface whith it’s top facing straight up/away from the clicked surface. (Image below)

/TheDDestroyer12

The typical solution is to use the RaycastHit.normal. This line of code executed on the object to aligned will align it with the surface:

  transform.rotation = Quaternion.FromToRotation(transform.up, hit.normal) * transform.rotation;