I have a cuboid with 8 points that is axis aligned with its center at the origin 0,0,0. Now I have a plane and want my cuboid to rotate so that instead of being axis aligned, it is now aligned to this plane and its front and back side are parallel to the plane and the center is on the plane.
However, I also want to get the euler angles for this rotation so I can manually change the result. It needs to be euler angles and not a matrix/quaternion so the values can be changed by the user and euler angles are the best way for this representation.
I tried some ways to do this, but it never accurately worked.
Compute three vectors $X$, $Y$, $Z$ representing your new coordinate frame as you describe it. $Z$ would be the normal to your plane, and $X$ and $Y$ are determined by your "its front and back side are parallel."
Then follow the description in Wikipedia, Geometric derivation, which details the computation of the Euler angles from $\{X,Y,Z\}$.
(Image from Wikipedia.)