Employers (mostly correctly) infer that if you can figure out how to pass tests at a high level, especially when specifically about something relevant like computer science, then you can figure out how to build a form (or handle the input, or query a database, etc.). You say you don't know anything, but I bet that you could implement binary search a whole heck of a lot faster than someone who's never programmed at all before. Of course, in your first job you probably won't have to - and you might not in any job after that, either. But you could figure it out, which is about the same thing as figuring out whatever it is you'll actually be asked to do in your job.
In fact, it's been so long now since you didn't know any programming at all that you literally cannot recall what it was like to not know any. So as far as you are able to think, you must not know anything - because you have no one who actually doesn't know any programming to compare to, because most people know truly zero programming and don't try to, so you are unlikely to have experience with anyone who actually knows nothing attempting to do it. The only comparison you can make is upwards, to people you assume must know more than you. This leads to a warped worldview, and often manifests as imposter syndrome.
In short - it is a normal human response to the weird and rarefied world you live in. You'll live.
As to what will happen in the first job, anyone with experience working with people fresh out of college (regardless of degree level) expects that in the first 3-12 months you will do little that turns out to be actually useful or valuable. With companies that know how things work, you'll be put on an existing project that has some minor changes to be made, or they'll put you on a special project that really only exists to get new employees up to speed on the local system. Any company that hires you with the demand that you "hit the ground running" is more than a bit silly, but they usually appreciate you pretend to be making progress and dirty hacks are the best they can hope for, and they'll pay you for it nonetheless. If you don't think back in horror at the code you use to get paid to write, you aren't paying attention.
What companies who hire people like you know is that you are at least of above average intelligence, you are used to figuring things out on short notice, and you have lots of experiencing turning out things that sort of seem to work even when you don't understand what is going on. You have years of experiencing doing what you are told even when you don't agree with it or see the point, to please weird and often inscrutable authority figures. You should at least be able to pretend you know what variables and methods are, you've heard of object orientation, you likely get the general concept of what a database is for, etc. - your degree should provide most of the fundamentals, whether you remember them very clearly or not. You'll be expected to cram to prepare for tech interviews (and later on, project presentations), anyway, which you obviously learned how to do too!
Honestly, this describes almost the perfect employee, which is why so many software companies are keen to hire from top universities - they know what they are getting! Sure, ideally employees would actually know what their job entails in full and be good at it already, but many hiring companies don't even know exactly what the job will entail month to month themselves - so how are they going to hire for that? Besides, people with all the skills already developed cost too much to hire and retain - you are not really competing with those people directly right now.
No, this is not the story these big-name universities tell, thus your feeling that your situations is unusual - but absolutely every manager working in IT/software I've ever talked with knows those marketing lines are baloney.
At the same time, that means some companies won't be very interested in someone with an advanced degree and no job experience. That's fine too - you don't need all the jobs, just one at a time. Apply to the sorts of places that hire people like yourself, who are in the position you are in now.
Having no professional experience, even in an internship, means an extra tick of challenge, but it is hard for everyone. Expect to have to spend considerable effort developing and being able to talk usefully about your past experiences. Preparing for interviews means recalling and retelling stories about class projects and assignments in ways that showcase what you learned, which you understandably don't recall easily - you'll have to work at it, and that's a big part of what "preparing for interviews" is.
Getting the first "related experience" job entry is one of the hardest transition periods. It's always this way. Using a PhD as a way to kick the can down the road will not automatically solve the problem, and you'll just have similar challenges to overcome then too.
You may need to take advantage of flexibility to travel and being willing to do work other people would pass over as 'boring'. Insurance and education companies, for example, often have to work hard to recruit people because everyone graduates and wants to apply to the most famous name-brand tech companies and don't even think about applying to them. Some pay less, some pay more, some companies are more pleasant than others, etc.
You'll get the first job because you get it, and that's about it. You put yourself in what turns out to be the right place at the right time, it won't be perfect, and you are unlikely to be especially good at it at first. But it's a start, and "getting good" is something you will have to work at for years - no one is good just because they went to college. With time in a related job where you have a good attitude, develop your skills and experience, and build up a network of people in a similar line of work, the next job can be a lot easier to find.