I am using this on a custom component:
$url = index.php?option=com_content&view=article&catid=427&id=15106
Both
echo $url;
echo Route::_($url);
will output a friendly url.
I'm guessing this is coming from some J4 plugin and I should always use echo Route::_($url);
for good practice, right?