Take two images. One exposed for the subject, one exposed for the sky. Read this article to learn how to blend the images:
https://luminous-landscape.com/digital-blending/ A tripod is useful when doing this, makes it easier to line up the images when blending.
There are other techniques. I use Topaz Labs ReMask when blending.
If you shoot raw, you can sometimes recover the sky from a single image by masking the sky, putting it on a separate layer, and change the layer mode from normal to multiply, adjusting the opacity if needed.
You can even replace the sky with a completely different sky, though that may not always look natural.