How to override url params with rewrite rules vars?

“hi” message is displayed instead of “hello” in the second example

Yes, because that’s how it works: query_vars is a hook for registering custom query vars that are public, so if the URL query string contains the custom query var, then WordPress will set the query var to the value parsed from the query string.

the desired situation is generally “hello”

You can override the query var via the request hook. E.g.

add_filter( 'request', function ( $query_vars ) {
    if ( isset( $query_vars['myparamname'] ) ) {
        $query_vars['myparamname'] = 'hello';
    }

    return $query_vars;
} );

Just be sure to use a unique query var or be cautious that you don’t override query var that shouldn’t be overridden.