The PSTN is defined by who it connects. US rules, in 47 CFR 20.3, describe the public switched network as common carrier switched networks, by wire or radio, that use the North American Numbering Plan. They name local, long-distance and mobile carriers. The definition says nothing about copper or about circuits. A service that gives you a public phone number reaches this network through a carrier.
VoIP is defined by the way a call is carried, and two internet standards show how it is done. RFC 3261 defines SIP, the Session Initiation Protocol, as a signaling protocol for creating, modifying and ending sessions such as internet telephone calls. RFC 3550 defines RTP, which carries the audio in packets. Each packet has a sequence number and a timestamp so the receiver can rebuild the stream.
Because one term describes reach and the other describes transport, a call can be VoIP without touching the PSTN, and it can be both at once.
Microsoft Teams shows the first case. Microsoft's Teams Phone overview says calls between Teams users in the same organization are handled inside Teams by default and never go to the PSTN. To call an outside phone number, the organization needs a PSTN connection from Microsoft or another operator, which supplies the phone numbers and the access. Microsoft treats that connection as separate from the Teams Phone license.
US rules have a name for the second case: interconnected VoIP. 47 CFR 9.3 defines it as a two-way voice service that needs a broadband connection and IP-compatible equipment, and that lets users receive calls from the PSTN and place calls to it. A business phone service that runs over broadband and makes and receives calls on public phone numbers meets that description.