Jot that down before you forget.

Literal

Not-forget [while-うちに] that [object-を] jot-down-in-advance-[soft-command-なさい]

書き付ける is a compound verb = write-attach, i.e. jot down onto something. Paired with ~ておく to mean 'jot it down and leave it written (for later).' ~なさい is a soft imperative — gentler than the plain imperative but still commanding; typical of a parent or teacher to a child or subordinate.