Adobe XD helps with prototyping.
You can't build functioning websites in XD, but you can create protypes (or mockups) of what the site should look like, how buttons and styles should interact with user input (to a limited extent).
In my work, we have a designer who will create a mockup in XD which we then hand to our developers to actually convert it into a live and functioning site.
The designer is the one who works with the client to ensure that they are getting what they want. XD also provides a faster method to show "working" samples to the client and get their feedback.
There are cases where for super simple mockups you know you can make it in HTML/CSS much faster and without much need for XD... (I've done this before) it's a case by case basis.