Bootstrap class: .d-*-block

<span class="d-block bg-primary">d-block</span>
<span class="d-sm-block bg-primary">d-sm-block</span>
<span class="d-md-block bg-primary">d-md-block</span>
<span class="d-lg-block bg-primary">d-lg-block</span>
<span class="d-xl-block bg-primary">d-xl-block</span>

Preview

d-block d-sm-block d-md-block d-lg-block d-xl-block

More in Bootstrap Display