Harper Lee actually wrote Go Set a Watchman before writing To Kill a Mockingbird, and the ideas in Watchman gave birth to Mockingbird. Though the story of Mockingbird focuses on Scout's and Jem's childhoods, beginning with Scout at the age of 6 and Jem at 10, the tale is actually narrated by a more adult Scout after reminiscing with Jem about the events of the story. Similarly, Watchman is set in Scout's adulthood, when she is 26. We also know for sure that in Watchman Jem passed away two years ago from a heart condition inherited by their mother, but we don't know for sure if the adult Jem is still alive or has already passed away by the time the narration begins in Mockingbird. It is possible the narration of Mockingbird begins at the exact same relative time in which Watchman is set, perhaps just a few years before the setting of Watchman. All in all, we know that both the narration of Mockingbird and Watchman are set when Scout is a young adult, no older than her 20s.
We see evidence in the very first paragraph of Mockingbird that Scout, officially named Jean Louise, narrates the story as a much older person than her childhood character. In the first paragraph, she reflects on a time when Jem's arm was "badly broken at the elbow," an event we know Scout narrates in greater detail towards the end of the book. Hence, Scout is speaking as a narrator after the events of the book have already drawn to a conclusion, which means she is much older as a narrator than her 6-year-old character. Further evidence that she is much older as a narrator can be seen in her references to many years having passed by since the events leading up to Jem's broken arm, as we see in the following sentence: "When enough years had gone by to enable us to look back on them, we sometimes discussed the events leading up to his accident" (Chapter 1). This reference to years having gone by and her ability to "look back" on events hints that Scout is narrating the story of Mockingbird as an adult.
What's interesting is that, since Jem is only referred to in the past tense, the reader cannot tell for sure if Jem is still alive or not at the time that the narration of Mockingbird takes place. In contrast, we learn in the very first chapter of Watchman from the third person narrator that Jean Louise's brother has died:
... Jean Louise's brother dropped dead in his tracks one day, and after the nightmare of that was over, Atticus, who had always thought of leaving his practice to his son, looked around for another young man. (Ch. 1)
While we don't know for sure if Jem is alive or dead in Watchman, we do know for sure that Jean Louise is an adult. We can tell she is an adult based on the fact that the opening chapter mentions her drinking coffee, taking a train from New York to Maycomb, and the fact that she usually flies to Maycomb, something she would not have been able to do in her childhood
Hence, since we know that Jean Louise is an adult in both Mockingbird and Watchman, we know they are set in relatively the same time period.