Loki has shown that it is impossible to fool him, not even when your name is Tony Stark!
Episode 1 of the series Loki includes many easter eggs not to be missed, including nods to the MCU and especially to Iron Man. During his trial at the premises of the TVA, he even referred directly to the latter. Facing Judge Ravonna Renslayer, he argues that he only took possession of the Tesseract because the Avengers time traveled. An astonishing accusation, since he’s not supposed to know about this part of the story. If Loki guessed their presence, it’s simply because of Iron Man. He mentions that it is easy to spot two Tony Stark thanks to their cologne.
Loki being the god of mischief and a great expert in lies and manipulation, it may not have been very difficult for him to understand what was going on. Especially since the Avengers, and notably Tony Stark, made a few mistakes along the way that resulted in the Tesseract sliding down to Loki’s feet. This short dialogue in the series also shows that the God of Mischief was already aware of the actions of the Avengers when he grabbed the cube and escaped. From a certain point of view, he’s not really wrong, without the Avengers he would never have been able to get away with the Tesseract. Moreover, according to the wise observation of some fans, the group of heroes really complicated their task in Avengers Endgame.