<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.0.0-beta2/js/bootstrap.bundle.min.js"></script>
<script>
$(function() {
    $('input:first', '#form').on('input', function() {
        var msg = $(this).val();
        $('button:first', '#form').attr("disabled", (msg.length > 0) ? false : true);
    });
});
</script>