+1 for National Railway musuem.
It’s free entry (they welcome donations obviously), but they will get their money back if you eat in the cafe. A few scones, a bag of crisps and a couple of drinks the other week stung me for £27 😯
Also, just north of York is a farm play place called Piglets – ours (2,5 and 7) love it there. They’ve got the tradional animals area and then loads of play stuff and a maize maze.
If weather is poor then also a massive soft play place on the north edge of York called Creepy Crawlies. It’s get chaotically busy though and seems to get bigger every time we go, so if you like keeping a close eye on child then you might struggle.
Also, can be tricky to find details, but theres a quirky minature railway run by an enthusiasts group in a village called Gilling East near Helmsley. Cheap rides on the trains and a play area too. Think it only runs on Sundays though.
Tripadvisor Link