It’s no use shutting the stable door after the horse has bolted

return pic

To attempt to prevent something from happening but too late to prevent damage being done

origin pic

John Gower’s Middle English poem Confessio Amantis published in 1390: For whan the grete Stiede Is stole, thanne he taketh hiede, And makth the stable dore fast.