I know the cost of an editor seems expensive to many writers, but like any profession, quality work will require expertise and time. If you are on a tight budget, there are many suitable tools out there to proof read and even copy edit (Grammarly, ProWritingAid, etc). I would use one of those to clean a novel up initially.
After this, money could be focused on hiring an editor that can look for plot holes, pacing, and character development issues, and also provide suggestions on improving your work. If that's still not in the budget, I would suggest find some Beta readers with those skills.
Once you deal with their feedback, you could start sending to agents and/or publishers. Or self publish, if that's your route.
FYI - here's a link to one of many good articles on this.
I'll add some estimates of professional editor prices I found for a 40,000 word novel:
- Proofreading - basic spelling, punctuation and grammar errors - $30/hr, total $500-$1000 (Canadian)
- Copy Editing - the above, plus line-by-line coverage, correcting phrasing, tone, sentence structure, etc. - $40/hr, total $1000-$1600
- Developmental Editing - high level stuff, looking at theme and character development and style and pacing. You will get suggestions for improvement, but the changes are up to you - $50/hr, total $1600 - $2700
Unfortunately, most people considering self-publishing can't afford these prices, so they try to do it themself, or give their novel to a well-meaning friend. Maybe there is a need out there for less than a Cadillac solution, for 'adequate' editing. I could probably do that for half the price, especially proof/copy editing.