Vector3.angle only in on axis

I need to get the angle between the grounds normal vector and the vehicles up vector but only in the vehicles local x axis. like this:

Green line is the ground normal and blue line is the vehicles up vector. If we look from behind the vehicle we can se that the lines aren’t pointing the same direction but if we look from the side the lines have no angle between them. And this is what I want to achieve, I want to see if the the vehicle is tipping over but not if it wheelies for example and it shouldn’t matter where the vehicle is pointing. I already put way to much time into this problem and I know this is probably really simple. Hope i was clear enough this time and any help i appreciated.

Nevermind I’ve found the Vector3.ProjectOnPlane and it works for this purpose