For a near-white margin, try magick scan.png -fuzz 1% -trim +repage trimmed.png and compare it with an exact-trim version. Inspect the outermost handwritten date as well as the four corners. A dark speck outside the page may hold one edge open.

Clean that spot on a copy or crop that edge manually. Keep the untrimmed scan when margin notes carry information.

Why scanning several small photos at once cuts off their edges · ImageMagick trim