You'd better write it down before you forget.

Literal

Forget-not while [in-に] note-down-in-advance [comparison-方が] good-is [emphasis-よ].

~た方がいい is the standard suggestion pattern: 'it would be better to [do].' The past tense ておいた before 方がいい is required by the construction. ですよ combines polite copula with assertive よ — a friendly but firm suggestion. ~ないうちに ('while not yet [verbing]') marks 'before forgetting' — a window-of-opportunity construction. A natural, helpful thing to say.