Quite often beginner books make the mistake of introducing music through "positions". Thus you may learn to place your hand in "C position" where (RH - Right Hand) thumb 1 plays C, index 2 plays D etc. In "G position" the same thing would turn into G = 1, A = 2 etc. And so on. This teaches you a wrong thing. You end up:
a) associating a finger with a key and note (not good)
b) thinking your hand has to be in fixed positions (also not true)
and that becomes a reflex.
Instead, any piano key can be played with any finger. You could play C with your middle finger or ring finger, and you would still hear the same note, right?
But there are some principles at work. In piano, fingering is very important. The idea is to set your hand up so that you can play the notes as conveniently as possible. As you advance, you'll learn to see notes fall into groups that your fingers can dance around, and then another group that are easily grasped in the hand. People experiment with what works best and then "work out their fingering". In beginner books, that's often done for you. Figure out why they chose this or that fingering.
The piece you posted seems designed to make you think about your fingering. Brogers suggested a good solution. At some point you need to move your hand down one key size. That is done most easily as you get to the end of m. 2 and your flexible index finger is resting on D for two whole beats. While you're still there, you can slip your ring finger on the ready for the E, and then you have covered all the notes. Your final C will be played with 2 because you have effectively slid your whole hand over one key space.