The general definition (although it can be pretty loose) is that you need to control the computer/server your software is running on. If that is a VPS or a server in your basement really doesn't matter all that much in the end when talking about if something is self-hosted or not.
Why doesn't it matter? A VPS is still someone else's computer. They could be monitoring what you're doing on there because they run the hypervisor and they have physical access.
As I said, it's a loose definition, but the same could also be said, if I place a second computer at my parents place for example so I can have an offsite backup. They technically could also be monitoring it and have physical access. I don't think anyone would argue that this isn't self-hosting though.
For me at least self-hosting is mostly about having control of a computer/server software wise, not physically. That is probably an important differentiator from homelabbing, which is more focused on controlling the hardware. You can combine the two, but for self-hosting you don't need to physically control the hardware.