Is it bad to withdraw a manuscript one day after it has been submitted?
I am a co-editor of an interdisciplinary journal (social sciences/humanities). I would rather an author withdraw and get the piece into shape than for us to either read it and have to desk reject, or to send to reviewers and they flag it. It's mildly embarrassing but like so many things in academia (and life), you will care more than they will care – it is trivial for me to return a paper to an author.
If the editorial management system allows you to withdraw the paper, even better.
I once withdrew a paper shortly after submission (IIRC a week or so; found a mistake in the data analysis code and said so to the editor).
The editor basically answered thank your for letting us know* and that if we resubmit within the next so many weeks, they'd count it as revised submission that keeps the original submission date, if we need longer to fix everything we should do so as entirely new submission.
That was basically all there was to it - and really much less painful than one would think beforehand.
I'd recommend being open to the editor about the reason: someone showing up with "I made a mistake and need to correct it" is trustworthy.
Also, if I understand you correcty, you got an important comment on the preprint. If that is the case, you may tell the editor that you got an important comment about ... on the public preprint which you think should be addressed, and ask whether they prefer you to this now or to bundle it in with the revision.
* I don't think a reviewer would have had an earthly chance to spot the mistake although it did have consequences for the results (didn't change the broader picture, but they were visible with the naked eye). In my field back then publishing the code alongside was unknown.
You should withdraw it immediately. Reviewers are not paid for their time in reading your paper, though they have other motives to do it. So if you withdraw while it is with the editor you save everybody's time, most importantly, yours.
It is indeed careless of you to have not got it proofread before submitting. But better to fix the mistake right away.
Be polite and smart in writing a withdrawal letter to the editor. And do get it proofread by your friend.
Best of luck!