How send get request to external api with username and password

Watch your keys:

       $headers = array(
           // 'headers' => array( // this is duplicated
                'Authorization' => 'Basic ' . base64_encode( 'username:password' ),
                'Accept' => 'application/xml'
           // )
        );

        $res = wp_remote_request(
            $url,
            array(
                'method'    => 'GET',
                'headers'   => $headers
            )
        );

Don’t send headers inside headers. Using a variable name different from args can help you spot the issue.

Example reference in docs:

https://developer.wordpress.org/plugins/http-api/#get-using-basic-authentication