Vortices at the nanoscale form due to imbalances or disturbances in the system. In superconductors, for example, vortices form when the material is exposed to a magnetic field, causing the supercurrent to circulate and create a vortex. In magnetic materials, vortices can form when the magnetic domains are manipulated or disrupted.