You have two options when it comes to "matching" on-premises accounts with AAD ones:
1) Soft-match, based on the PrimarySMTPAddress value is generally the easiest option. It does have some prerequisites though, so make sure you cover all the details as listed here: https://support.microsoft.com/en-us/topic/how-to-use-smtp-matching-to-match-on-premises-user-accounts-to-office-365-user-accounts-for-directory-synchronization-75673b94-e1b8-8a9e-c413-ee5a2a1a6a78
2) Hard-match, based on the objectGUID (or generally speaking the sourceAnchor, which can also be set as the value of mS-DS-ConsistencyGuid). This is a bit more complicated as it requires you to calculate and populate the ImmutableId value. Here's an example:
Get-ADUser -Filter * | select UserPrincipalName,ObjectGUID,@{n="ImmutableID";e={[System.Convert]::ToBase64String($_.ObjectGUID.tobytearray())} } | export-csv -nti C:\immutableID.csv
$csv = import-csv C:\immutableID.csv
$csv | ? {$_.UserPrincipalName -ne ""} | % { Set-MsolUser -UserPrincipalName $_.UserPrincipalName -ImmutableId $_.ImmutableID}