If you are using bootstrap modal then you use below code in javascript web part or in external JS file
<script type="text/javascript">
$(window).on('load',function(){
$('#myModal').modal('show');
});
You can check the page URL or any query string value in that page for which you want to open the search dialog on page load.