How do I make an object slowly rotate 360 degrees?

I looked everywhere and I couldn’t find this. I also tried to do this with animations but it stopped my other animations from working. Please help.

here use subject as the transform object you want to rotate and speedOfRotation is the degree rotation you want per second.

void objectRotation(Trasform subject,Float speedOfRotation)
{
  subject.Rotate(Vector3.Up*speedOfRotation,Time.deltaTime);
        }

call this function and pass both the variables in the function. Adjustthe speedOf rotation with your reqquirement