Read first, or watch first?
Read first, though not for the usual reason — the 2004 film shares so little with the book that it can't really spoil it. The problem is the reverse: it sets up a missing father and a race to save him, and a child who meets that first will spend the novel waiting for a plot that never arrives, because Nesbit's book is a comedy about wanting things badly and asking for them carelessly. Come to it cold and the shape makes sense immediately. If you want an adaptation that follows the story, the 1991 BBC serial is the one, six half-hours of it, currently streaming — and it works best after the book, as a reunion. The 2004 film is perfectly pleasant on its own terms; just treat it as a different story that borrowed a sand-fairy.