How to rotate MainCamera at a specific time

I’m making an 2D infinite runner for class and i’m pretty new to Unity itself. I want the camera to tilt around the Z axis with several rotations with it starting and ending at a specific time in sync with the music associated with it. Help would be greatly appreciated!

I havn’t done this myself but might be best to use animation to move and rotate the camera rather than transform if you know the exact rotations that you want to do. I think theres also a new timeline feature in unity which I havn’t used yet but I believe it will also help you do what you want to do.