How to create quaternion defined by angle and up vector

So I want to create rotation defined by up vector and angle.
I tried Quaternion.AngleAxis(angle, transform.up) but it doesn’t work.
transform.RotateAround works but I don’t want to rotate by some angle, I want to create rotation with exact angle.

Sounds like what you are looking for is Quaternion.LookRotation(forwardVector, upVector);

So if you want to rotate an object around the local up vector relative to the worldspace forward axis you can do:

Vector3 fwd = Quaternion.Euler(0, angle, 0) * Vector3.forward;
Vector4 right = Vector3.Cross(upVector, fwd);
fwd = Vector3.Cross(right, upVector);

Quaternion q = Quaternion.LookRotation(fwd, upVector);

This should calculate a rotation around the provided up vector relative to the world forward axis.