That depends on a few things.
The first thing your VPS does is resolve the domain name of the server it's trying to access. If you have an entry in
/etc/hosts, then that DNS resolution will happen locally (and won't go out into the larger internet). Otherwise, some UDP packets will need to be sent and received.
Once that step's done, and the human-readable name has been mapped to an IP address, if that IP address maps to a local NIC then packets will be routed locally. Otherwise (if, for example, you're using a proxy) they'll be routed out of the box, where they'll travel in a loop and return right back to the VPS (assuming no one MITMs the connection).
So, assuming you have a local mapping of hostname to local IP address, it shouldn't create external internet traffic.
However, I'm guessing there are ways to ensure even local IPs are routed externally using the RPDB / netfilter.
In any case, the overwhelmingly easiest way to check things like this? Use
tcpdump and analyze the output with