The "heart" here refers to the mind and thoughts of the person. Alternate translation: "so that you are not occupied" (See: [[rc://en/ta/man/jit/figs-metonymy]])
The rest of this sentence, "like a trap," is in verse 35. Just as a trap closes on an animal when the animal does not expect it, that day will happen when people do not expect it. Alternate translation: "that day does not happen when you are not expecting it, as when a trap closes suddenly on an animal" or "that day does not surprise you like a trap" (See: [[rc://en/ta/man/jit/figs-simile]])