[verb ない-form] + ほうがいい [verb ない-form] + ほうがいいです
ないほうがいい gives advice against something: "you'd better not", "you shouldn't". The verb is in the ない-form, and ほうがいい follows it.
Adding です makes it polite; the verb stays in the ない-form.
Advice to do something takes the た-form: たほうがいい. Advice not to do it takes the ない-form, not the past negative.
ないほうがいい recommends. It is softer than てはいけない, which forbids, and the listener is still free to decide. よ at the end makes the advice friendlier.