I dont Know why Its not Working Its all in 1 sprite and its 2d,I don't know why it does not work this is all in one sprite Please Help Me

I don’t know why it does not work this is all in one sprite

Please Help Me

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

public class Coins_display : MonoBehaviour
{

    public static int coinsAmount;
    private Text coinsCounter;

    // Start is called before the first frame update
    void Start()
    {
        coinsCounter = GetComponent<Text>();
        coinsAmount = 0;
    }

    // Update is called once per frame
    void Update()
    {
        coinsCounter.text = "Coins: " + coinsAmount;
        if (Input.GetKeyDown(KeyCode.Space))
        {
            coinsCounter.text += 1;
        }
    }
}

Don’t coinsCounter.text += 1; but coinsAmount += 1;

using UnityEngine;
using UnityEngine.UI;

[RequireComponent( typeof(Text) )]
public class Coins_display : MonoBehaviour
{

    public static int coinsAmount;
    Text textDisplay;

    // Start is called before the first frame update
    void Start()
    {
        textDisplay = GetComponent<Text>();
        coinsAmount = 0;
        RefreshText();
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            coinsAmount += 1;
            RefreshText();
        }
    }

    void RefreshText ()
    {
        textDisplay.text = $"Coins: {coinsAmount}";
    }
}