Yes! Absolutely. It'll be the only way for you to really know whats going on behind the scenes. When I got started, my first few expenses of my tech career were a domain, a private non-gmail email inbox, and a wordpress website via Bluehost, ...and some business cards. It must have cost me $100 for the first year which was mainly the domain + bluehost costs.
I was running a wordpress blog with Bluehost where I shared things that I learned during my college CS classes. As I started learning how to write and serve java + ruby projects, I wanted to make them public, but couldn't run them off my laptop which was my one and only machine. I was also getting limited by what I could do via Bluehost - either the plan I was on didn't give me direct SSH access, or I didn't know what SSH was at the time and I was used to admin'ing with cPanel and couldn't think of how you install ruby via cPanel.
I deployed my next few apps via Heroku, CenturyLink (fka AppFog), and AWS. They get more expensive as the tech gets more and more sophisticated, but the apps I was writing also needed databases and both Heroku + CenturyLink made it easy to link a database to your application. It seemed like a worthwhile expense and I focused on learning those in order to get my applications deployed.
If you want to keep costs low, DigitalOcean and other VPS hosts like Bluehost can give you a server with a public IP address for ~5/mo. Server costs would run you ~60/yr, not a bad investment for learning. You can always run a server out of your home (like a Mac Mini running in your living room). Although it can be a very good lesson in how to set up your network so that requests to your IP can arrive at your home server, you also expose your personal home network to potential hackers - FYI. Once you want to have multiple applications running at once, then it'll be worth it to learn about other hosting providers like AWS and GCP, along with a bit of a bigger sticker price for more reliable infrastructure.