How to add HTML into error message

Please try this to add HTML:

$link = '<a href="mailto:[email protected]">admin</a>';
sprintf( __( 'File is too large contact %s.', 'my-textdomain' ), $link );

In this case the placeholder “%s” is replaced with the value of the variable “$link”.
And that variable is filled before.