It returns either the number of rows inserted or false on error.
Maybe you can get id of inserted recode or false if the insert fails:
refer link: https://developer.wordpress.org/reference/classes/wpdb/insert/#return
So you can check like below:
$result_check = $wpdb->insert( $table, array("name" => $name, "email" => $email));
if($result_check){
//successfully inserted.
}else{
//something gone wrong
}