Pokemon Sun and Moon is the seventh generation of Pokemon games and with it brings a new group of completely new Pokemon to catch. With each new generation though, that means there are even more Pokemon to find to complete the Pokedex and it’s actually not going to be possible right now to do so.
Pokemon Bank and Poke Transporter were introduced a few years ago as a cloud based Pokemon storage system that you could use to transfer Pokemon between Pokemon Black, White, Black 2, and White 2 up into the Pokemon X and Y generation. Since then, Pokemon Omega Ruby and Alpha Sapphire have also released that can use Pokemon Bank, as well as the virtual console releases of Red, Blue, and Yellow.
It is incredibly easy to use Pokemon Bank and Poke Transporter to take your Pokemon between previous games, but the bad news is that it is not currently possible with Pokemon Sun and Moon.
You can of course trade Pokemon between Sun and Moon themselves so that you can fill the Alolan Pokedex, but it is actually impossible right now to fill the entire National Pokedex.
This is due to the fact that Pokemon Bank is not currently usable with Pokemon Sun and Moon, with an update said to be coming sometime around January that will enable this feature.
This kind of works as a way to where people can enjoy Pokemon Sun and Moon as standalone experiences for the time being, rather than relying on Pokemon caught in the past. This is something we really haven’t been able to do with the franchise since Ruby and Sapphire released on the Game Boy Advance and weren’t able to connect with the first two generations.
For the time being, you will just have to enjoy Pokemon Sun and Moon on their own, but you will definitely be able to gain access to any Pokemon from Red, Blue, Yellow, Black, White, Black 2, White 2, X, Y, Omega Ruby, and Alpha Sapphire in the next few months.