I don't know if I should trade one of the legendary pokemon I got from the Ultra Wormhole for fear that I may not be able to get it again. Can I trade it then go back and find it again or will I have to trade again to get one? I would also like to know if it is the same for the four Tapu.
Ultra Beasts (specifically the original ones from Sun and Moon) can be caught and traded as many times as you want and you will always be able to encounter more.
Any other legendaries (such as box legendaries like Ho-Oh or trio members like Thundurus) can only be caught once. Even if you trade or release them, once caught, they will never be able to be re-encountered in your save file again. Defeating them in battle, however, will just require you to beat the Elite Four again, in a manner similar to previous games.