The public was not aware of the Avengers’ time travel until Scott Lang revealed it in his book, Look Out For The Little Guy! where he recounts his experience of being part of the time heist and fighting Thanos and his army in Endgame.
He mentions in the book's introduction that Bruce Banner (the Hulk) and Clint Barton (Hawkeye) encouraged him to share his story with the world because they felt that people deserved to know the full story behind Thanos and the Blip. In the book, Scott says:
One day, Bruce “the Hulk” Banner and Clint “Hawkeye” Barton took me out for lunch. They said they were concerned that the world didn’t really know what had happened with Thanos and the Blip and our long struggle to finally put things right again.
At first, as I usually do when confronted with heavy topics, I made a joke: “I’m pretty sure at least half the world knows what happened.”
Bruce responded that yes, of course, billions had experienced these jarring and mind-bending events, but they didn’t know the full story behind them. And ultimately, that’s what people need the most to get through and get past traumatic events: a narrative that helps it all make sense.
“Okay,” I agreed. “Solid plan. So who are you going to get to tell that story?”
Clint answered, “You, Scott. You’re the guy who got scooped up in all this pretty recently. You’ve still got one foot in their world. And you’re a guy everyone likes…and trusts.”
And Bruce sealed the deal: “It’s tough stuff, and no one knows how to keep it light like you.”
They’d supply me all the archival footage and documentation, take me anywhere I needed to go, and let me ask as many questions as I needed.