I have built a couple of hackintoshes now, and money is no longer a reason to build them. If you built a hack with feature-to-feature parity you will find that Apples economies of scale kick in big time, even with the so-called “Apple tax.”
You can build a cheaper hack than the cheapest iMac, but it’ll have lower specs.
The reason to build a hack these days is for things Apple doesn’t offer, like an internal Bluray drive, multiple hard drives, multiple video cards, specialty bus cards, etc. Basically if you want a tower like the old Mac Pros your only choice is to build one.
If your Mac is otherwise functional but has a failing optical drive your cheapest fix is an external one as suggested above. Otherwise places like Macsales.com might have a replacement internal if you are willing to undertake repairs yourself.
.