This depends entirely on you, the canvas is not a “player” like a video or sound player that you can pause or stop.
You need to come up with a way to stop whatever is happening in it. Like for example, if you have sprites moving, you will have to store the current speed in a variable or TinyDB tag and set its speed to 0. When the user decides to continue, then use the stored speed to resume the sprite’s movement.