。
She had no choice but to give up the plan.
Literal
[topic-は] cannot-be-helped that plan [object-を] gave-up.
やむを得ず ('unavoidably, having no choice') is a fixed adverbial phrase — literally 'unable to stop' (やむ = stop/cease, を得ず = classical negative continuative of 得る 'to obtain'). It's a high-register way of saying 仕方なく ('reluctantly, with no choice'). The classical particle remnant を + 得ず is preserved as a frozen phrase rather than a productive grammar pattern. あきらめる ('to give up, resign oneself to') is the standard verb for abandoning a plan or hope.