Thank you so much!
I’ve created the modal manually because I followed the method that I saw here in Javascript code.
function presentModal() {
// create the modal with the `modal-page` component
const modalElement = document.createElement('ion-modal');
modalElement.component = 'modal-page';
// present the modal
document.body.appendChild(modalElement);
return modalElement.present();
}