WARNING: This post contains SPOILERS for Ant-Man and the Wasp.
How Avengers 4 will use time travel may have been revealed in Ant-Man and the Wasp through the film's Quantum Realm explanations and mid-credits scene. The cliffhanger ending of Avengers: Infinity War left half the heroes of the Marvel Cinematic Universe dusted from Thanos' universe-altering snap with the Infinity Guantlet. However, Infinity War is the first half of a two-part story that will conclude next year in Marvel Studios' Phase 3 capper, Avengers 4. Though very little has been officially confirmed regarding the movie, we know Avengers 4 will use time travel in some form. Set photos for Avengers 4 show the film's stars in the costumes from The Avengers.
That said, exactly how Avengers 4 will use time travel - and whether it will make sense within the MCU timeline - has been the subject of debate among fans. The different methods of time travel Avengers 4 could use, according to various theories, include the Time Stone, Tony Stark developing time travel, or the Quantum Realm. Now that Ant-Man and the Wasp has officially arrived and offered more insight into the Quantum Realm, we might have a much better idea of how the heroes of Avengers 4 will time travel.
In the first Ant-Man, Hank Pym described the Quantum Realm as "a reality where all concepts of time and space become irrelevant as you shrink for all eternity," which was the most we knew about it until Ant-Man and the Wasp. The sequel offers a little more insight into the mysterious dimension, including how time works in the Quantum Realm - specifically that it works differently. Further, in the post-credits scene for Ant-Man and the Wasp, Janet van Dyne warns Scott Lang not to get trapped in a time vortex.
The scene doesn't go into specifics about what exactly a time vortex is or how it works, but the fact that it's name-dropped in the credits scene undoubtedly hints at it being important for future Marvel movies. While it might actually be a connection between Ant-Man and the Wasp and Captain Marvel, it also establishes a way for the heroes to use time travel in Avengers 4.
Based on Janet's warning to Scott, though, it seems like time vortexes in the Quantum Realm can be tricky and difficult to control - hence why he might become "trapped" in one. She was stuck in the Quantum Realm for 30 years and seems wary of them, but she may also have some kind of working knowledge of them. So, with Scott being trapped in the Quantum Realm at the end Ant-Man and the Wasp, it's possible he'll learn to control them - either on his own or by running into a previous version of Janet in the microverse - and he can use that knowledge to help the Avengers defeat Thanos.
Given the inclusion of "time vortexes" in the Ant-Man and the Wasp mid-credits scene, it seems likely they'll be important going forward. Since we know Avengers 4 will deal with time travel, it follows that the Phase 3 capper will somehow utilize the Quantum Realm's time vortexes as part of its story. How Avengers 4 incorporates them, and how exactly they work, remains to be seen. Still, it's likely that Marvel Studios has already explained how time travel will work in Avengers 4, and fans can theorize the rest until the movie hits theaters next year.