The question of exactly how Quicksilver and Scarlet Witch were gifted their powers by Loki's sceptre at the end of Captain America: The Winter Soldier has largely gone unexplored as it was widely assumed it was simply a matter of magic. But according to one fan theory, the seeds of that empowerment were sewn in Iron Man 3.
The theory, which was posted on Reddit, points out that in Iron Man 3, Aldrich Killian shows Pepper Potts that the human brain has an "empty slot" that is "destined to be upgraded", and seeks funding to develop DNA recoding technology to help those upgrades and allow subjects to achieve other abilities.
That is essentially exactly what HYDRA do to the twins, using Loki's sceptre to effectively unlock that latent potential, also making them the personification of the warning Pepper gives Killian when she turns down his request:
"Unfortunately, to my ears, it also sounds highly weaponisable. As in, enhanced soldiers, private armies".
This was essentially Marvel building to the reveal of "super soldiers" who could be enhanced without them being inhumans, but it was all too easy to miss. And it fills in a gap of logic in establishing how Loki's sceptre (and the Mind Stone within it) is able to give the twins their powers.
Thank God for the eagle-eyes and ears of the fanbase.