呈现新模板symfony 4时出现FileLoaderLoadException

I am new and trying to enhance my knowledge to this framework. Having a difficulty in rendering a template, it gives me an error:

FileLoaderLoadException ERROR 64] XML declaration allowed only at the start of the document (in n/a - line 2, column 6) in C:\xampp\htdocs\symfony\configoutes/routes.xml (which is loaded in resource "C:\xampp\htdocs\symfony\configoutes/routes.xml")

Controller

<?php

namespace App\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response;

class UserController extends Controller
{
    /**
     * @Route("/homepage", name="user")
     */
    public function index()
    {
        return $this->redirectToRoute('homepage');
    }
}

YAML

user:
    path:     /homepage
    controller: App\Controller\UserController::index

XML

<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/routing
        http://symfony.com/schema/routing/routing-1.0.xsd">

    <route id="user" path="/homepage">
        <default key="_controller">App\Controller\Userontroller::index</default>
    </route>
</routes>

Question: How can I solve this? Is there something I missed causing this error?

Maybe you don't understand how does works the routing in Symfony and It's normal for newcomers.

Routing is very easy, you have to define it (in yaml OR XML OR PHP OR annotations) not All just one of them :-).

The best practices recommend to use annotations so comment your yaml and remove XML files and follow the documentation

/**
 * @Route("/homepage", name="user")
 */

/homepage means that this url matches this function and name="user" It's the path name in twig like this

<a href="{{ path('user') }}">User page</a>