You need to apply the size to the
modal-dialog
element, as shown in the documentation:
Optional sizes · Modal · Bootstrap v4.5[
^]
If you want to set the width inline, you'll need to use the correct syntax for the
style
attribute, and set the
max-width
property.
<div class="modal-dialog" style="max-width:75px">