All jobs have some task or other which is tedious. For those things, we put our head down and get it done because it's part of the job.
But I am assuming you're talking about a bigger situation of boredom - being generally bored at work. Common causes...
- not challenged in your current role
- work out what job you want next and look for opportunities to take on related duties so you can learn how to do it
- not enough autonomy to use "spare" time in a productive way -
- in tech there is never "nothing to do". The only way you can have literally nothing to do is if you got your assigned work done very fast and you are not allowed to do anything else. Which seems like a weird scenario for a coder.
- If you have spare time at work and some autonomy - improve something, look into the incoming versions of tools/tech you use, look into areas of the codebase you maybe haven't worked on much. Or, use the time to learn about some other area of the business - do you know how the designers work, or what problems the devops people are solving? Have you ever asked what the finance/marketing/hr people are actually doing? Knowing how your company manages its money, promotes itself and finds new people are good things to understand for everyone.
- have been doing too much of the same kind of task
- see if you can rotate onto another team
- or on a smaller team, try learning a key skill from a coworker
- or just reorder your tasks so you can do something different for a while - sounds simple, but map out the tasks you need to do in the next sprint... are there bad tasks you don't want to do? smash them out at the start. Use the more interesting stuff as motivation.
...and every last one of these has "or, look for a new job" as an option. It's not to be done hastily just because you're bored for a day or even a week or two. But if you are bored for long periods; you've tried everything where you are and nothing has helped; and you have a realistic chance at getting a different job... go for that better job.
Or if you are consistently bored in more than one job - perhaps a career change is in order. This happens! I have a coworker who is leaving a tech job to study sports medicine, because they realised they are passionate about helping people achieve peak physical performance. Want to guess how happy they are? :)