How to make the Mini Map not rotate with character using C#?

I am making a 3rd person game and I wanted to have a top down mini map. Although I already have the mini map up it rotates when I rotate my character. I don’t have a script on the camera itself all I have is it pared with the character. Could anyone give me a full C# script showing how to make it follow but not rotate? Thanks!

Make the camera folow the player:

public Transform playerTransform;
public float offset_y = 10f;

void Update() {
     transform.position = playerTransform.position + Vector3.up * offset_y ;
}

or keep the camera as a child of the player, but reset it’s rotation every frame:

void Update() {
     Vector3 eulerAngles = transform.eulerAngles;
    eulerAngles.y = 0;
    eulerAngles.z = 0;
    transform.eulerAngles = eulerAngles;
}