Harry Potter and the Cursed Child is set 19 years after the events of Harry Potter and the Deathly Hallows.
The play opens with an adult Harry Potter (now Head of the Department of Magical Law Enforcement) seeing off his youngest son, Albus Severus Potter, at King's Cross Station for his first year at Hogwarts. The story then unfolds over the course of that school year, exploring the father-son dynamic, legacy, and a new threat involving Time-Turners.
This 19-year gap aligns with the epilogue of Deathly Hallows ("Nineteen Years Later"), making The Cursed Child a direct continuation of that glimpse into the future.