I failed one portion of the OH exam. Do I have to retake both sections

No, you can retake just the section you failed. The retake fee will be $39 regardless of which section you are retaking.