The events in Loki directly affect what happens in Ant-Man and the Wasp: Quantumania, and with all the temporal complexities laced in these stories, it’s best to jump down the rabbit hole and figure out what’s going on.
Loki follows the titular Variant as he works for the Time Variance Authority (TVA) alongside agent Mobius M. Mobius. His mission is to prune other Loki Variants from the timeline who have been causing mischief. When he meets Sylvie, a Loki Variant on a mission to expose the TVA for having kidnapped her, the two successfully reach the Citadel at the End of Time, where He Who Remains (a Kang Variant) has been maintaining the Sacred Timeline to keep the evil Kangs from the multiverse away. Without his control, the Sacred Timeline would branch off into other timelines and Kang could rise. Unable to relinquish her vendetta, Sylvie kills He Who Remains and that very scenario happens.
In Quantumania, Scott Lang, Cassie, Hope van Dyne, Hank Pym, Janet van Dyne, all journey into the Quantum Realm, an extraordinary world filled with strange environments and creatures. Also there is Kang the Conqueror, who, based on his dialogue from the newest trailer, is stuck there and needs Scott’s help to get out. Scott’s main mission is to be with his daughter, and he might be tempted to align himself with Kang to get what he wants. In the Quantumania trailer, Scott tells Kang, “We had a deal,” but it evidently falls apart and the two come to blows.
The reason for Kang’s existence is because of the events in Loki. After Sylvie killed He Who Remains, Loki returned to the TVA and saw that Kang was now in control of it with a giant statue dedicated to the supervillain. While this is where season one of the Loki series ended, Ant-Man 3 will delve into the ramifications of having unleashed such a colossal threat. Basically, this Kang will be doing exactly what He Who Remained was warning Loki and Sylvie about. He’s got a whole army at his command and it looks like he’s preparing for a massive conflict.
It’s important to remember that the Kangs are highly intelligent. He Who Remains spoke about how he discovered a way to travel across the multiverse and encountered versions of himself, some who were evil and some who were good. These evil Kangs sought to conquer all the timelines to reign supreme and A Multiversal War broke out. He Who Remains stood as the victor by using Alioth, a powerful cloud-like entity created from the tears in reality. Without He Who Remains or anybody else to act as guardian of the Sacred Timeline, the main MCU is heading dangerously close to this happening.
This leads back to Quantumania. The trailer shows multiple versions of Ant-Man who are likely Variants of him, which were introduced in Loki. Kang says that he will help someone get home and give them more time, but if a deal is struck to get him out of the Quantum Realm, he will assuredly seek to conquer the other timelines. This is what will probably lead to the conflict in Avengers: Secret Wars as another multiversal war breaks out and the new team will do battle to save their timeline and others.