High score not saving

Yesterday my code worked perfectly fine. However I changed the bundle identifier and know the high score won’t save. I don’t know what happened. The high score is calculated in totalTime. Notice in the picture the label with high score 0.0.

import UIKit

class resultsViewController: UIViewController {
@IBOutlet var SCOREXX: UILabel!

public var LebelText: String?


@IBOutlet var lebelTEXTED: UILabel!
@IBOutlet var HIGHSCOREXX: UILabel!
override func viewDidLoad() {
    super.viewDidLoad()
    timeCalculation()
    loadState()
    


    // Do any additional setup after loading the view.
}

func saveScore(score: Double) {
    
    // Instantiate user defaults
    let userDefaults:UserDefaults = UserDefaults.standard
    
    // Set your score
    userDefaults.set(score, forKey: "highScore")
    
    
}

func loadState() {
    let userDefaults = UserDefaults.standard
    let score = userDefaults.double(forKey: "highScore")
    HIGHSCOREXX.text = "High Score: \(score)"
}


func timeCalculation(){
    
          guard let unwrapedText = self.LebelText else {
        return
    }
    if let myInt = Double(unwrapedText)
    {
        var  totalTime = myInt
        
        self.SCOREXX.text = "You won"+"\n"+"Reaction time :" + String(totalTime) + " Seconds"
        
        
        guard let highScore = UserDefaults.standard.value(forKey: "highScore") as? Double
            else{return}
        if totalTime>highScore{
            saveScore(score: totalTime)
        }}}}

According to your code in timeCalculation(), you use guard to check that there’s an existing highScore value in UserDefaults. If there is, you can compare it against the new score and save a better result. If there’s no existing score, you end the function.
UserDefaults isn’t universal, it’s keyed to your app. So when you changed the bundle ID, the app lost its original UserDefaults data, and there’s no existing highscore for the new bundle ID.
Perhaps before your code returns from the guard statement, you should save totalTime as the initial high score.