How to align Button on the right of the image on desktop but below the image on mobile

CSS would check the width of the screen, and (if small enough), change the display of the picture to block. As taught by W3Schools

<style>
.the-image,
.the-price {
    display: inline-block;
}
@media only screen and (max-width:600px) {
    .the-image {
        display: block;
    }
}
</style>
<img class="the-image" src="https://wordpress.stackexchange.com/questions/367889/...">
<div class="the-price">...</div>