をやめるよう

to stop

→ を
phrase Uncommon #16,933
to stop Used with 言う (to say), 忠告する (to advise), and similar verbs to report an instruction or request to stop doing something. The を marks what should be stopped.
JA: 医者に夜更かしをやめるよう言われた。
EN: My doctor told me to stop staying up late.

医者は私に、たばこをやめるよう忠告した。

The doctor advised me to quit smoking.

私たちは彼に喫煙をやめるよう説得したが無駄だった。

We tried in vain to persuade him to quit smoking.

トムにそれをやめるように伝えておいて。

Please tell Tom to stop doing that.

医者は彼に喫煙と飲酒をやめるよう言った。

The doctor told him to stop smoking and drinking.