Noob Programming student needs some help rotating game objects (kinda new to unity)

I’m trying to make a Game Object rotate 90 degrees every 5 seconds, I thought this code would work, but the sprite just remains as it was before clicking the play button. Please, help this noob, so I can learn.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Rotate : MonoBehaviour
{
    //timer support
    float TotalResizeSeconds = 5;
    float ElapsedResizeSeconds = 0;
    //resize control
    float ScaleFactorperSecond = 1;
    int scaleFactorMultiplier = 90;
    // Start is called before the first frame update
   
  

    // Update is called once per frame
    void Update()
    {
        Vector3 newScale = transform.eulerAngles;
        newScale *= ScaleFactorperSecond*scaleFactorMultiplier * Time.deltaTime;
        transform.eulerAngles = newScale;

        if(ElapsedResizeSeconds >= TotalResizeSeconds)
        {
            ElapsedResizeSeconds = 0;
            ScaleFactorperSecond = -1;
        }
       
    }
}

The Transform.Rotate method is probably what you’re looking for.
Example:

public class Rotate : MonoBehaviour {
   float rotateTime = 5f;
   float nextTimeToRotate = 0f;

   void Update() {
      if(Time.time > nextTimeToRotate) {
         //Rotates by 90 degrees on all axes. You can set whichever axes you do not want to rotate to 0.
         transform.Rotate(90f, 90f, 90f);
         nextTimeToRotate = Time.time + rotateTime;
      }
   }
}