The on-premises Active Directory UPN becomes your login for Office 365. Your UPN should match your primary SMTP address. And changing the UPN doesn't mean anything happens to the samAccountName, which means unless the user is logging into their workstation with the UPN, there will be no change to the user's workstation login experience.
Below some helpful links-
Office 365 – Why Your UPN Should Match Your Primary SMTP Address
Why do you need to fix mismatched UPNs and SMTP addresses before you migrate to Office 365
Scripts to update UPN to match the user's Primary SMTP email address