Please put below div where you want to display data.
<div id="popupId"></div>
and please use below function where you want to open popup Model data.
<script>
require([
'jquery',
'Magento_Ui/js/modal/modal'
], function ($,example,modal) {
var options = {
type: 'popup',
responsive: true,
innerScroll: true,
buttons: [{
text: $.mage.__('Continue'),
class: 'primary action submit btn btn-default',
click: function () {
this.closeModal();
}
}]
};
jQuery('.order-status-review').on('click', function() {
var orderId = jQuery(this).data("orderid");
var commentId = jQuery(this).data("commentid");
var statusId = jQuery(this).data("statusid");
$.ajax({
method: "POST",
showLoader: true,
url: "<?php echo $block->getUrl('contrller path'); ?>",
data: { orderid: orderId,commentid:commentId,statusid:statusId}
})
.done(function( data ) {
if(data.orderstatusHtml != ""){
$("#popupId").html(data.orderstatusHtml).modal(options).modal('openModal');
}
});
});
}
);
</script>
You can modifed this function as per your requirement.
also, you have to created one controller which fetch data according your need and put it in your popup data div.
i hope this solve your problem
Thanks,