i use the LevelManager script and the playermovement script to pause the game when i press escape button.
And in create a Canvas for Pause menu
for the main menu button i add 2 onclick actions because was bugging when i start the game again
and this is my inspector for levelManager script
i only found this problem: when i press escape faster sometimes doesnt resume the game.
and for last my inputSettings.
i hope this can be useful