For any serious Pokémon trainer, Pokémon Bank is a very worthwhile investment. This handy app connects with any of the 7th generation games (Sun, Moon, Ultra Sun and Ultra Moon) and 6th generation games (X, Y, Omega Ruby and Alpha Sapphire) and lets you transfer and store up to 3,000 Pokémon online.
Pokémon Bank is available to download from the Nintendo 3DS eShop for free, although you need to pay a nominal fee (4.99 USD) to use its services for a year. If you don’t renew after the year’s over, you can still withdraw your Pokémon, but depositing Pokémon will become impossible.
Additionally, Pokémon Bank comes with a companion app called Poké Transporter that can import Pokémon from the 5th generation games (Black, White, Black 2 or White 2) or Virtual Console games (Red, Blue, Yellow, Gold or Silver) to Pokémon Bank, making them ready for use in the recent games.
Furthermore, Pokémon stored in Pokémon Bank can be sent up to Pokémon Home on the Nintendo Switch. That way, you can use your treasured creatures in Pokémon Sword and Shield (and presumably future games).