Meta query compare for ID’s greater than specific ID

You can use prepare:

global $wpdb;

$post_ids = [];
$last_id = 350;

$query = $wpdb->prepare(
    "
        SELECT ID
        FROM $wpdb->posts
        WHERE ID > %d
    ", $last_id );

$results = $wpdb->get_results( $query );

// it will convert the IDs from row objects to an array of IDs
foreach ( $results as $row ) {
    array_push( $post_ids, $row->ID );
}

//now you can set up your query
$custom_args = array(
    'posts_per_page' => 100,    
    'post__in' => $post_ids
    );


$custom_query = new WP_Query( $custom_args );

if( $custom_query->have_posts() ) :
    while( $custom_query->have_posts() ) : $custom_query->the_post();
        echo get_the_title() . '<br>';
    endwhile;
endif;

Reference

Note: You can change condition as per your requirement >, >=, <, <= etc.