<form class="row justify-content-center">
<div class="col-8">
<label for="inputPassword2" class="visually-hidden">URL</label>
<input type="text" class="form-control" id="inputUrl" placeholder="Url">
</div>
<div class="col-auto">
<button type="submit" class="btn btn-primary mb-3">Open</button>
</div>
</form>
<form class="row justify-content-center">
<div class="col-8">
<label for="inputPassword2" class="visually-hidden">URL</label>
<input type="text" class="form-control" id="inputUrl" placeholder="Url">
</div>
<div class="col-auto">
<button type="submit" class="btn btn-primary mb-3">Open</button>
</div>
</form>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(function() {
$('form').submit(function() {
event.preventDefault();
$('body').html('<iframe src="'+$('#inputUrl').val()+'"></iframe>')
});
});
</script>