In Japanese, there are several ways to express that something ‘should’ be done. たほうがいい
is one of the most common, especially when giving advice. This expression uses the past tense of a verb grouped with 方（ほう）, the particle が
, and the い-Adjective
It would be better if you washed your hands before you eat. (You should wash your hands)
It would be better if you told the police. (You should tell the police)
As 方（ほう） can be translated closely to ‘way’, or ‘direction’, this expression is suggesting that one specific choice is simply the better ‘way’.
This expression is quite direct, and can imply that there may be some sort of negative consequence if (A) is not done. In that respect, this phrase could also be translated as ‘It would be better if you did (A)’.
may also be used with the base (dictionary) form of a verb, but will sound more like a general opinion in those cases, rather than giving advice.
Even though it is expensive, it is better to eat delicious meat. (This is a general opinion)
It is better to put away the dishes as soon as possible. (This is a general opinion)
Because this phrase is quite direct, it would be better to use a more polite expression like ばいい, if giving general advice.