If you own the domain
example.com, you also automatically own all subdomains for it.
www.example.com is a subdomain of
example.com, so is
baz.www.example.com. Usually you buy the domain without the
www., it'd be unusual to buy only the right to the
www. subdomain without also owning the parent domain.
What you need to do is set up your host (the server that hosts the actual website) correctly to serve websites for
example.com. As long as the DNS system is set up correctly to send requests for
example.com to your host,
www.example.com should work as well. If your host responds to queries for
example.com with the right website, you're all set. This is pretty standard, usually you don't need to do anything to make this work. It may depend on the host/registrar though, ask them for details.