If both phones use the same type of sim card, then there is no reason why you can't swap it.
To confirm if they do, I would recommend visiting the manufacturers website for both phones, or you can go to www.gsmarena.com, and you may be able to find the information you are looking for.
If you like this post, please click the "like" button.
For more assistance, you may contact us at www.telus.com/chat
The other thing you will have to watch is iMessage. If you switch the SIM back to the Samsung, you'll have to de-register (https://selfsolve.apple.com/deregister-imessage) with Apple or anyone with an iPhone won't be able to send you messages.