I don't think there's a single book that neatly ties up with that title, but I can think of a few possibilities, so I'll go with the one that seems most plausible. You might be referring to 'Scarlet Witch' characters in Marvel prose novels or tie-ins, or perhaps a fantasy novel with a 'Scarlet Warlock' as a central figure. If it's a specific fantasy series, I haven't read one by that exact title, so I can't give you a definitive ending.
However, I did read a web serial once that had a mage dubbed the Scarlet Warlock for his crimson robes and fire magic. That story ended with him sacrificing his own magical core to seal a dimensional rift, which cost him his powers but saved the kingdom. It was bittersweet—he got a quiet retirement, running a bookstore instead of casting spells. I remember the final line was something about the peace of turning pages being a different kind of magic.
If you're thinking of something else, like a Marvel novelization, the 'end' would depend on which story arc. Often, characters like Wanda Maximoff have cyclical fates—tragedy, redemption, more tragedy. Her stories rarely have a permanent 'end' in book adaptations; they just pause until the next crisis. I'd need the exact book title to be sure, but in general, warlocks in fiction tend to either achieve their forbidden goal at a great cost or are ultimately destroyed by the very forces they sought to control.