Before Boruto uses the Flying Thunder God Technique in Boruto: Two Blue Vortex chapter 4, he can be seen getting pestered by his toad to go after Code. During the scene, Boruto can be seen telling the Toad to keep quiet, given that he is not as skilled as his grandfather.
Considering that Boruto referred to Minato Namikaze’s skills, there is a good chance that he may have seen his grandfather show his skills in person. This has generated the idea that Boruto may have met Minato during the timeskip.
But how was Boruto able to meet his grandfather? In the same way Naruto met Minato during the Shinobi World War, Boruto may have met his grandfather through the Edo Tensei jutsu. After Eida used her technique to switch Kawaki and Boruto’s places, Boruto realistically had only a few allies. This included Sarada, Sumire, Sasuke, and as evident from Boruto: Two Blue Vortex chapter 4, Kashin Koji.
Therefore, Boruto and Sasuke may have used the Edo Tensei technique to bring back Minato, who would not have been affected by Eida’s Shinjutsu, to help his grandson. While neither character is known for using Edo Tensei, there is a good chance that Sasuke may have learned the technique when he saw Orochimaru use it to bring back the four Hokage. However, this is only a possibility if Sasuke had managed to learn the technique.
If not, another way would be to steal the forbidden scroll from the Hidden Leaf Village. This scenario may have been the moment one year after the original Boruto manga where Sasuke and Boruto may have confronted Code.
Otherwise, there is also the possibility that Kashin Koji may have helped the duo steal the scroll. This is hinted at in Boruto: Two Blue Vortex chapter 4, as Kashin Koji is evidently Boruto’s new ally. Given that he was Jiraiya’s clone, his chakra signature was the same as his original. This could possibly allow him to go past Hidden Leaf Village’s security.
Another theory points towards time travel. Since the start of the new manga series, several developments have hinted at Boruto having traveled back to the past during the timeskip. While the theory may sound outlandish, an anime canon arc saw Boruto and Sasuke go back in time using an ancient Otsutuki artifact.
Considering that no one may have known the two in the past, it was a safe place for them to train. This scenario may have helped Boruto meet his grandfather and learn the Flying Thunder God Technique. Hopefully, the manga will soon reveal how Boruto used the jutsu in Boruto: Two Blue Vortex chapter 4.