First of all, Welcome to The Firing Line!
Everyone has to start somewhere and you've come to a good place.
As has been said, the manual which came with the handgun will tell you what ammunition is appropriate to use. Ammunition names can be confusing and it isn't unheard of for someone to buy .38S&W only to find out later that it won't work in their .38 special. You did the right thing by asking.
You didn't ask about using it in your .40S&W until someone told you the .357sig is a necked down 40 caliber. That shows you're thinking. You haven't seen what a .357sig cartridge looks like and you may not know what "necked down" means. It means the case mouth opening was reduced to accept a smaller bullet. In this case a 9mm (.355") bullet. The ".357" is strictly for name recognition and to make it sound like the venerable .357mag. It causes confusion and in this case brought you here.
Had you bought the .357sig and tried them in your .40S&W they may have worked. The accuracy would have been abysmal with the bullet being so much under bore size, but most likely would not have damaged anything but your pride.
Read the manuals and get the proper ammunition for your handguns. If you didn't get a manual; they are usually available for free either on line or by contacting the maker.
Welcome again to the club.
Proud member of the NRA and Texas State Rifle Association. Registered and active voter.