Not long at all
The Internet is kept up only with an army of support engineers
The earlier answer about the power grid is correct, as well as the implication that one person simply cannot maintain enough equipment to keep things running.
But there's a detail that I happen to know because I work server-side in a web company, which I haven't seen anyone else mention.
No major website runs without constant human intervention. Behind the scenes, of course, all of these 'websites' actually run on banks of servers. These servers are far more finicky than most people would imagine. Machines have a hardware failure, and need replacement with new machines. Connectivity brown-outs require manual intervention to fix. The database machine's hard disk gets too full, causing performance to grind to a halt.
Every one of these companies has an operations group: a whole team of people whose job it is to write tools to let them monitor the health of the system, and to address the constant litany of issues that threaten system stability.
It is true that much of the chaos is due to changes on the backend causing problems. But not nearly all of it. The computer software running all these websites is, simply put, too complicated to run 100% unattended.
Getting a website back up would require significant reverse engineering
This is also why your main character would have difficulty ever getting any of these systems back online. The average website's back end consists of a complex architecture: something like a dozen different components that all depend on each other. To get the site back online would require understanding that infrastructure well enough to know how to restart everything yourself.
To gain this knowledge, MC would have to find the company's offices (no small feat without internet), find the servers running their internal wikis, their bug report database servers, etc. Then get them back up and running. Then MC has to find their source code. If it's stored on GitHub, well, that's that. You want to find a local copy sitting somewhere on a developer's laptop. Which MC now needs to break into, since they're all encrypted nowadays (because too many employees had lost or stolen laptops full of detailed personal info of too many companies' customers, totally unencrypted so anyone could read it). You can't even read the files without the password or a really clever hack.
Sure, hackers trying to crack DRM don't need any of that. But they're just trying to get one program to work. They don't have to get a whole suite of programs to all talk to each other in a highly complex dance.
Then, if MC wants all the old data to be accessible, MC now needs to find the actual data center where the data is stored. This could be very close to the dev's offices, but is more likely to be very far away. Assuming MC can even find out the location from the data available in the company offices.
Even for someone who knew exactly what they were doing, and had, like, a local copy of Stack Overflow and other online references saved locally (we don't memorize that stuff anymore; Google is usually faster than looking it up in a book), and who knew how to bypass login screens to get the info they need, this would still take months, likely years.
Then, once MC's got this one service back up, it won't stay up unless they're constantly keeping it happy (see point #1). Trying to keep services up that operate out of two data centers that aren't close together will be literally impossible.
And the inevitable fire, earthquake, flood, etc. will permanently destroy the service after a few decades anyway. Normally websites keep multiple redundant copies of production system data, but that won't be an option for our MC.
If MC made it their mission in life, and they were, pre-event, an honest-to-goodness
expert genius programmer/hacker , and at rigging up small-scale power generators, they might be able to find useful services, and get versions of them that run on very small networks MC maintains personally. Each service would take years to develop, so there wouldn't be much time to salvage more than one or two. But that is not "the Internet" anymore, that's just a small local network.
Making new electronics is highly dubious
I'm a programmer, not a hardware guy. So I'll leave it at this: I find it very very likely similar limitations will make it essentially impossible for MC to make new hardware. MC might be able to cobble together working units out of recycled parts, but building new parts is probably impossible. Making integrated circuits requires clean rooms that can't even have a speck of dust get inside (because the little wires that make the circuits are much smaller now than your average speck of dust).