"Everyone makes mistakes, that's why they put erasers on pencils." The sage Lenny once said this on a memorable Simpsons episode with Frank Grimes.
And oh, my. When one writes hundreds of thousands of words in a series of novels, the mistakes will add up. I swear I know the difference between their, there, and they're. But the wrong words, the wrong grammar, and the wrong style will indeed sneak in.
I usually make several edit runs through my novels as I write them. I read them in a weekly writers workshop group on Zoom, which is totally great because you can share your screen while you're reading aloud. Additionally, I make use of an editor for my novels who finds all kinds of oops items. (Hi, Sarah.)
And just this past week, also I bought an editing program called Pro Writing Aid. It's caught a lot of errors that hid in plain sight and that I flat out made the wrong choice without knowing it. I'm absolutely sure that errors will make it into my works, which isn't ideal, but by no means immutable. That's the glory of indie publishing with ebooks and print on demand. If you find mistakes, you just correct them, and upload an updated version.
The ultimate aim is to get it right the first time, but like the pencil in Lenny's quote, editing is the eraser to fix that mistake.