Giving advice with 〜た+方がいい
Grammar: Necessity » 〜た+方がいい
When attached to the た form of a verb, 方がいい means that something else would be better (to do). It is similar in meaning to the English “had better do”.
Alternate Explanations
The た form of a verb, followed by the phrase 方
( がいい, is used to give advice. It corresponds to the English ‘had better do’. The sentence-final particles ね and よ are frequently used when giving advice, either to soften a suggestion (ね) or to give force to it (よ).
Kamiya, Taeko. “Commands, Requests, Suggestions, Approval, Disapproval, Prohibition, and Obligation.” Japanese Sentence Patterns for Effective Communication, Kodansha, 2005, p. 170
This pattern shows how to give advice, make a suggestion. This is done with the phrase 方
( がいい preceded by a verb in the plain past tense. 方( がいい literally means ‘alternative is good’. The alternative being suggested is obviously the one expressed by this phrase, but the other alternative often remains unspoken. The unspoken alternative is often simply taking no action at all. The subject of this pattern is 方( (marked by が), and the topic is the person to whom the advice is being directed (marked by は); since this person is often ‘you’ or ‘I’, it is frequently omitted as being understood form context.
Chino, Naoko. “Basic Pattern 40.” A Dictionary of Basic Japanese Sentence Patterns, Kodansha, 2000, p. 233 Syaro gives a suggestion before everyone goes swimming. Cocoa did fortune telling for her friends, only for all their fortunes to happen to her in a bad way. As Cocoa mislabels her swimming style as the (front) crawl.Examples
Better to do light stretches before swimming with 〜た+方がいい

Better to give up fortune telling with 〜た+方がいい

Better to re-learn how to swim with 〜た+方がいい

Supplemental Examples