For example, if a student is saying things like "I can't do this" then tell them they they might not be able to do it yet, but if they keep trying and working hard that they will be. Providing this type of encouragement could change how a student looks at the situation because you're not just telling them to try harder.
Showing your students that is is okay to mess up and then showing them how to correct it is a great source of encouragement. For example, if I am teaching and I mess something up in our schedule, I would get the class together and explain to them that I made a big mistake and then show them how I am going to fix it which could be by telling them the new schedule and updating our board.
An exmaple of this would be to have goals for each lesson and unit to encourage students to reach it. For example, writing something like "My goal is to be able to add 2+2 by the end of today" on the board or even having students write their own goals at the beginning of each unit.
It is very important to provide students with challenges froma. young age because they need to be able to understand that not everything they do will be super easy. While it is important to challenge them, it is also important to know how much is too much and when is a good time to challenge them to ensure that you get the best results. For example, you probably wouldn't want to teach a super difficult lesson right after doing another super difficult one, you would want to review the first one until they understand it and then squeeze in a couple of simple lessons before you tackle another hard one again.
If you are about to do a hard lesson then giving students a reminder that it is normal and important for them to struggle will make them feel more confident and comfortable going into it. Saying something like "Okay guys, what we are about to talk about is really difficult but I know that you guys can handle it or I wouldn't be teaching it to you. Let's focus in and remember that it is very very normal to struggle and if you are what do we do...? and at this point they would hopefully all say "Raise your hand"