Replace image name on upload to the new post name on front-end form

You can use sanitize_file_name filter to rename file. put this code in active theme’s functions.php, this will rename image filename as postname if only get title request. I have tested this code and it is working fine.
Post name : https://prnt.sc/q3thzw
Uploaded renamed image : https://prnt.sc/q3tib7

function make_filename_as_post_name($filename) {
    $info = pathinfo($filename);
    $ext  = empty($info['extension']) ? '' : '.' . $info['extension'];
    $name = basename($filename, $ext);
    $new_name = $_REQUEST['title'];
    if(!empty($new_name)){
        # Replace space with dash 
        $new_name = preg_replace('/\s+/', '-', $new_name);
        return $new_name . $ext;
    }else{
        return $name . $ext;
    }
}
add_filter('sanitize_file_name', 'make_filename_as_post_name', 10);

let me know if this works for you!