Twilio is very affordable. See my post about Twilio costs here.
The SIM is tied to my Twilio account, and the phone number is purchased separately in my Twilio account. So, I can cancel the SIM whenever I’d like, but keep the number so I can still place calls over the internet without a SIM. For sending SMS with a SIM, configuration is simple. Just use the SMS integration configuration. Otherwise, you can send Twilio SMS over the internet.
With Twilio, you can also use the Twilio Call integration, as seen here. Only, with a SIM card, you have to add the “device” to your configuration.