Hello, @SP2020! Welcome to the Auth0 Community.
You can find a sample rule here, which tells you how to set the NameID claim: Customize SAML Assertions
You should configure it to your liking.
As for #2, this is because your system is URLEncoding the value.
Let me know if this helps.