undefined means a variable exists but has no value yet:
let x
console.log(x) // undefined
null means you intentionally set something to "no value":
let user = null // No user logged in
Use null when you want to explicitly say "nothing here". JavaScript uses undefined for uninitialized variables and missing properties. Both are falsy, but they have different meanings.