how to make a checkpoint

the name says it all. I’ve seen in so many games that people make a working checkpoint but, i have no idea how! I don’t eve know where to start. if anyone can help please comment down below

I have 2 Checkpoint examples, ones fairly easy and the other is a bit more complex:

Checkpoint Example:
https://flowlab.io/game/play/1186464

Checkpoint Example 2:
https://flowlab.io/game/play/1251796

ok thank you