Sometimes kids will lose focus on a task because it is either too hard or too easy and they tend to lose interest. Make sure that you know on which level your child is, but you must also let your child understand that sometimes in life we have to do tedious or straining activities. We cannot only do the things we like and we cannot give up after the first try. You can also point out that the sooner they complete the "not so good" tasks, the longer time they can spend on the ones they enjoy.
Teach your child that they can always break up something into smaller parts. Even something as simple as a reading piece. Read a paragraph and make sure they understand it and then go on to the next paragraph. Splitting tasks and even allowing a little break in between will take away the overwhelming feeling of I do not even know where to start.
Give your child a quiet place where they can sit and do their work. Soft music playing in the work area can maybe block out other sounds which a child has not learned to block out yet.
This can be a fun game where the child must try and complete a task before the timer goes off. An indication for how long a child can focus at once is one minute per year. (this is just an indication and will differ from child to child). Do not make it impossible for the child to beat the clock, otherwise they will get discouraged, but also do not make it too easy. They have to concentrate and finish the task at hand.
A child must learn to set his/her own goals which he/she would like to reach and some guidance and rewards (even if it is just praising them for good work done) can be a great motivator.
You as a parent or teacher must acknowledge good work done - this will make the child feel positive and he/she would want to do better.
It is important for any child to eat healthy, get some exercise and enough sleep. This will better their concentration. Also allow them to stand up, stretch, go fetch a snack or take a break inbetween tasks. That will motivate them to carry on with the next task.
The brain is a muscle that needs to be exercised. Playing memory games is a fun way to do this. Have a look at these fun games for the little ones on https://www.mindgames.com/Memory+Games
you can also watch the video to test your memory skills.