How to interfere to default search to make it search in custom fields?

You are getting all post because you didn’t pass meta query correctly. Try this below code

function add_search_in_custom_fields( $query ) {

  // check the query type.
  if ( $query->is_search ) {

    $meta_array = array(
      array(
        'key' => 'my_key_title',
        'value' => $query->query_vars['s'] ,
        'compare' => 'LIKE',
      ),
    );

    // set meta query.
    $query->set('meta_query', $meta_array);
  };
}
add_filter( 'pre_get_posts', 'add_search_in_custom_fields');

Hope this help !