Cartridges don't memorize other cartridges' content. Your Ultra Moon won't have any Pokemon from your Ultra Sun -- the only game that will is that Ultra Sun copy. If you were able to store your Pokemon in Pokemon Bank before you lost the cartridge, you can remove them from Bank and put them in Ultra Moon, but there's no way you'll magically have Pokemon from a completely different file that you lost.
Tl;dr no