It seems that you need to put a bit of your own time into solving this issue - a bored dog will at some point find something to do and that is often some kind of activity that you don’t want - and that will be hard to untrain. That he wants your attention is a big bonus, because you can work with him without first encouraging him to.
You don’t tell us about the breed(s), but some were selected to be particularly active and willing to work. They need more exercise (both physical and mental) for their well-being than other, more sedate, breeds. And there’s his personality to consider.
So for practical reasons you are probably looking for especially effective ways interact, otherwise you would already be offering multiple long walks.
Scent work (searching for objects or following a scent trail) is one of the fastest ways to tire out a dog and can be done pretty much everywhere where there’s a bit of space. You can hide toys or treat pouches or even objects like socks, depends on what motivates your dog.
A second alternative is to engage his brain, e.g. by clicker training (the kind where you give “yes clues” to every action offered by the dog that’s going in the right direction, like for looking at an object, then touching it, then picking it up and finally putting it in a basket, for example).
And third, grab a handful of treats and have him do all the tricks he has already learned (vary the sequence!) and possibly add new ones. A fast kind of parcours through the yard with various and changing stations would be the deluxe version of that.
Ten minutes of really focused work with your pooch should buy you at least a couple of hours of peace and the more you can get him to focus and really work hard, the happier he will be to go snooze.
There’s another aspect that should always be checked especially with dogs that demand a lot of attention: Relaxing.
For some dogs, it can be difficult to “do nothing” and accept that there are periods when nothing is going to happen and during which they are supposed to be quiet.
You can best judge whether your dog falls into that category - can he relax (after all his other needs like exercise, food and water, potty are met)? If not, that’s a second topic where you should invest some time now and both reap the benefits later. And in this case, it’s as easy as patiently sending him back to “his” spot (corner, blanket, dog bed, cage…) as often as needed.
Having a set routine with clear time windows for activity and rest helps him understand because he knows what to expect.