Route::getRoutes() returns a RouteCollection. On each element, you can do a simple $route->getPath() to get path of the current route.
Each protected parameter can be get with a standard getter.
Looping works like this:
$routeCollection = Route::getRoutes();
foreach ($routeCollection as $value) {
echo $value->getPath();
}
Also, after the laravel installation of 8, the namespace property in app/Providers/RouteServiceProvider.php is now null