Relative rotation

I would like to know how to make something face upwards from any point

These are both 45 degrees but one of them looks like its pointing down

This has both of them appearing to be pointing upwards.

So how would I get the angle to make it point upwards in 3d from any point, I know this requires math but I don’t understand the math.

I’ve tried looking at the CFrame documentation but I didn’t understand and would like a more direct response.