Do you live in the US or Canada? If yes, the only messages you will be able to send with a free account will be simulated and limited to the Virtual Phone within Twilio’s website. For the purposes of this project the simulated phone. Alternatively you can use WhatsApp will do just fine.
Why can't you send messages to a real phone? Due to a change in the law, as of January 31, 2024 no one is able to send a SMS message originating from a Toll-Free Number (TFN) within the US or Canada, unless the TFN has been verified, the user is vetted and content intended to be transmitted is vetted too. This verification can take 2-4 weeks. That's a little much for coding practice.
Go to the Twilio Sandbox for WhatsApp: https://console.twilio.com/us1/develop/sms/try-it-out/whatsapp-learn
and then connect your WhatsApp account by pointing your camera at the QR code:

Once you've joined the Twilio Sandbox, you just need to change the Python code to use WhatsApp:
message = client.messages.create( from_="whatsapp:TWILIO_WHATSAPP_NUMBER", body="It's going to rain today. Remember to bring an umbrella", to="whatsapp:YOUR_TWILIO_VERIFIED_NUMBER" )
You should then be able to receive messages just like this:
