How can I create more upload paths, like a post corresponding to a post title folder used to store images of the same product

This probably isn’t the whole solution for you as you didn’t post any code, so I can’t incorporate what I know with anything, however, the following snippet will upload an image into a custom directory, made at the time of execution, as the attachment. I’ve commented the key lines…

function upload_to_new_dir() {
    global $post;

    //This gets the main uploads directory
    $upload_dir     = wp_upload_dir();
    
    //This sets a path to a new directory which we'll make, ie. '/uploads/the-post-slug/'
    $make_new_dir   = $upload_dir['basedir'] . $post->post_name;
    
    //Now we check if the directory already exists, if not, we make it
    if( !file_exists ( $make_new_dir ) ) :
        wp_mkdir_p( $make_new_dir );
    endif;

    //This gets the image file from an AJAX form for me, you'll have to find your own method
    $img_file           = $_FILES['img_file'];

    //Now set WHERE the image is going to be uploaded
    $upload_file        = $make_new_dir . "https://wordpress.stackexchange.com/" . basename( $img_file['name'] );

    //Move the uploaded file to the location specified
    move_uploaded_file( $img_file['tmp_name'] , $upload_file );

    //Get the name of the image file so we can record it somewhere
    $img_name           = basename( $upload_file );

    //Everything below here is for attaching an image as an $attachement
    //And setting it as the post thumbnail
    //I don't know if this is what you need or if you need another method
    $wp_filetype        = wp_check_filetype( basename( $img_name ), null );
    $attachment = array(
            'post_mime_type'    => $wp_filetype['type'],
            'post_title'        => $img_name,
            'post_content'      => '',
            'post_status'       => 'inherit',
            'menu_order'        => $_i + 1000,
    );
    $img_id         = wp_insert_attachment( $attachment, $upload_file );
    if( !update_post_meta ( $post->ID, '_thumbnail_id', $img_id ) ) {
        add_post_meta( $post->ID, '_thumbnail_id', $img_id, true );
    };
    set_post_thumbnail( $post->ID, $img_id );
}
//YOU NEED TO DETERMINE WHAT ACTION TO USE TO EXECUTE THIS

My recommendation would be to NOT interfere with the Media Library’s default operations and instead build your own function that you execute with AJAX from an admin side javascript.

If you’re doing that, the action you’d want is

add_action('wp_ajax_nameofajaxaction', 'upload_to_new_dir');

You’ll also need to create a nonce and check the nonce using at the start of the above function using:

check_ajax_referer();

Some light reading:
https://developer.wordpress.org/reference/functions/check_ajax_referer/
https://codex.wordpress.org/AJAX_in_Plugins