Load a template page based on part of slug in wordpress

You can filter template_include, check the request URL for your search words and return a custom template.

Here is a primitive example:

add_filter( 'template_include', function( $template ) {

    $template_map = [
        'advice-on' => 'advice',
        'links-' => 'link-collection',
    ];

    foreach ( $template_map as $find => $match ) 
    {
        if ( 0 === strpos( $_SERVER[ 'REQUEST_URI' ], $find ) )
            return get_template_directory() . "/$match.php"; 
    }

    return $template;
});

error code: 523