You must not be captivated by short-term gains alone.

Literal

Immediate [poss-の] profit [only-だけ] [to-に] captivated [prohibition-てはいけない].

目先 ('right before one's eyes') is slightly more colloquial than 目前. ~にとらわれる ('be caught by, be captivated') is the passive of とらえる. ~てはいけない is the standard prohibition pattern.