My cursor wont show up when I go into pause menu

I am having trouble with my mouse cursor. It wont show up when I go into pause. For some reason my camera still moves. Idk if thats a glitch or not lol
If it is possible can you try to fix it

here is the code

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

public class PausedMenu : MonoBehaviour
{
public static bool GameIsPaused = false;
public GameObject pauseMenuUI;

 // Update is called once per frame
 void Update()
 {

     if (Input.GetKeyDown(KeyCode.Escape))
     {
        

         if (GameIsPaused)
         {
             Resume();
         }
         else
         {
             Pause();
         }
     }
 }

public void Resume() 
  
    
  
 {
     pauseMenuUI.SetActive(false);
     Time.timeScale = 1f;
     GameIsPaused = false;
   Cursor.lockState = CursorLockMode.Confined;
 
 }
 void Pause()
   
 {
     pauseMenuUI.SetActive(true);
     Time.timeScale = 0f;
     GameIsPaused = true;

 }
 public void LoadMenu()
 {
     SceneManager.LoadScene("Menu");
 }
 public void QuitGame()
 {
     Debug.Log("Quitting Game...");
     Application.Quit();
 }

}

You aren’t assigning Cursor.visible.