playerprefs works on the editor but dosent work on my mobile phone

i dont know were is the probleme is i think i made everything right i tried everything but nothing worked it dosent show anything in my phone
here is my code :

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

public class GameMaster : MonoBehaviour
{
    public float slowness = 10f;

    public Text score;
    bool asLost;
    float vr;
   
   
    public Text highscor;
    private void Start()
    {
        vr = 0;
      highscor.text =  PlayerPrefs.GetFloat("HS", 0).ToString("F0");
       
    }
   
    private void Update()
    {

        if (asLost == false)
        {
            vr = Time.timeSinceLevelLoad * 10;
           
            score.text = vr.ToString("F0");
           
            if (vr > PlayerPrefs.GetFloat("HS", 0))
            {

               
                PlayerPrefs.SetFloat("HS", vr);
                PlayerPrefs.Save();
              
            }
        }
      
    }
   
   
    

    public void EndGame()
    {
        StartCoroutine(RestartLevel());
    }
    IEnumerator RestartLevel()
    {
        Time.timeScale = 1f / slowness;
        Time.fixedDeltaTime = Time.fixedDeltaTime / slowness;

        yield return new WaitForSeconds(2f / slowness);

        Time.timeScale = 1f;
        Time.fixedDeltaTime = Time.fixedDeltaTime * slowness;


    }
    public GameObject restartPanel;
    public void GameOver()
    {
       
        Invoke("Delay", 1.5f);
        asLost = true;
    }
    void Delay()
    {
        restartPanel.SetActive(true);
        Time.timeScale = 0f;
    }
   public void Restart()
    {

       
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
        Time.timeScale = 1;
    }
  

   public void GoToMainMenu()
    {
       
        SceneManager.LoadScene("MainMenu");
        Time.timeScale = 1;
    }
   

}

are you sure that the PlayerPrefs key exists? If it does not exist before you try to read it then it will return a default value, For GetFloat it will return 0f if the key does not exist.
You should check if it exists first before trying to read from it (line 20 in your code) or trying to perform a check against it (line 33 in your code).

Change line 20 to this :

if (PlayerPrefs.HasKey("HS"))
{
    highscor.text = PlayerPrefs.GetFloat("HS", 0).ToString("F0");
}
else
{
    highscor.text = "0";
    PlayerPrefs.SetFloat("HS", 0f);
    PlayerPrefs.Save();
}

Thank you i will try it

It didnt work it shows nothing on the phone when i try it using unity remote 5 it works just fine but when i build the apk it didnt work at all it shows nothing in the area