i need to compare an object's rotation to a directionvector(gravity for now 0,-9.81,0) and to return the difference between the 2 so that i can apply force accordingly

right now im trying to figure out what should be compared , ive been trying to get a meaningfull vector out of quaternion.lookrotation altough it seems to work only for setting the object rotation and not reading it since the result is in local space and is always the same if the object moves

other than that ive looked at euler angles but cant see how to turn the vector to a rotation with them eighter

this is pretty much where im stuck, i need to figure out the equation and next ill just have to see how to work with the result , im working only on 2d to make that part simpler

thanks for the help