hello, i am a beginner and i am making a 2d game

i want to make my 2d character to spawn at the last checkpoint .for e.g. i had created a level where if you want to go to the bonus level you have to get the key and after going inside the bonus level if the player clear the level or die in the level then i want that the player spawn in its last check point or the place where the door/chest is placed .

i had tried to use save and load but it is not working is there any tutorials which can help me . if there is then please give me the link.