My suggestion may not be the popular route, but it is what I did back in the non-apocalyptic days.
First, the screen is evil. But not in a modern parenting circadian rhythm or healthy development way, but more in the fact that its abundant uselessness in the form of youtube banalities is definitely guiding your kid down a certain route none of us know the outcome of.
None of us had these things back in what we call "the day." And at most, some of us might have just had the beginnings of the world of tech. We all can likely recall that our childhood days consisted of riding bikes in the alley way and digging holes. It was great, but kids these days don't live in the same world we did, and that's not to suggest our times were better. But somewhere in there is a fair middle ground that I believe we can reach with a few simple, totally devious ploys of playful interaction.
I wouldn't do the "do nothing" approach suggested in other answers but only because I did things slightly differently that involved me playing with them. Not a little, mind you. A lot. I would set up whole dollhouse scenes (works with boys and girls) and go for hours in evolving soap opera like story telling through the dolls, house, blocks, and whatever else we would roll into. But I did it with them. Often at my own device. I would make sure they saw me setting up a dollhouse story when they wandered into the room. And they would come see what was going on I would offer to have them join in and indeed they pretty much always joined in on the fun. It was never conventional, mind you. I would do horror stories, crime scenes, alien abductions, and all sorts of wild things that most parents would be insulted by. In the end, I had to have fun too or nobody would benefit.
I planned these distractions around the things I knew they liked to watch on those horrible youtube videos. But I would put my own twist in when it was subject matter I just couldn't join in on... like those awful kinder surprise things... no, we're not filming ourselves unwrapping trash! So what can I do that gets that same effect but in a much less material consumerist violation of my soul? Well, the options are numerous!
One comes to mind - I bought a bag of plaster, fetched a bucket of sand from the wash, and ordered some neat, yet cheap gems and things from all those vendors who can't sell at the gem and mineral shows because of covid. I made my own dig and find things and stuffed them with pyrite, amethysts, fossils, etc. Like dirt cheap options considering the store bought dig it kits are like $10 and you get almost nothing. This way I was in full control of the excavation and I could hide some really cool things every kid loves. And when they had their fun, I taught them to make them and saw what they came up with.
I would get some off the wall ideas too. Like getting up a little earlier than them and rolling myself in like 10 blankets so I'm stuck. When they came down in the morning they would laugh so hard because what happened here? and I would have them help get me out. It's silly, but it is the silly things that get real reactions that can make them decide to make escape rooms out of cushions and blankets instead of watching yet another mind numbing video about nothing... which they still do, mind you. It just doesn't dominate their lives.
The general point is that I stepped in - in a very non-authoritarian way - and manipulated the home life with options for engagement that they chose to join in on. I also would provide plenty of things that don't require me, and they did opt for them over the screens. But no doubt my willingness to goof off as much as the human soul can handle played a huge role in the screens being left to rest when they aren't in school in favor of a pile of paint, some magnets, and a little help from a harmless chemistry book. It wasn't easy to get off my a** and actually put my creativity to work, but once I got it rolling I realized how much of my own childhood I could seep into theirs without it being a thing they have to do to earn more screen time.
I should probably also mention that many of these little ideas I came up with were pretty solid and I ended up listing kits and things on various sites. Over the past several years they have managed to generate well over 100k in sales off of the most basic and simple things. Like the gem kit. Not hugely profitable, but people like that kind of thing. This is relevant to you because you say yours is really into cars and robots! How lucky! That would be so easy and so much fun! Especially at age 5. You know you can just buy every component you need to make a radio controlled car from just servos, a controller, and some patience. So you could start really small and conveniently allow him to happen across you messing with a servo and showing him you can make it move. Then go from there. You can build all kinds of mechanical chaos with simple tools, and if you learn anything from them you can assemble small kits for others and sell them online when you have had your fill. You may even be able to film you doing it with your kid and become one of those videos people watch. I mean, if that's your thing. I sort of just thought - why not? What's the worst that happens? They don't sell?
But in summary, I would get clever and set him up for finding interests in things you can do with him and you may find his interests shifting toward the hands on. It could be the necessary step for him to see online schooling positively and separate from play. I'm no expert there per say, but it's at least something to put some chips into.