I created this example, I hope help you with what you want to do.
This is the final result
Basically what the flow does is compare the first name in List A with all the all the names in List B, then compare the second and so on, you need to be careful when selecting the correct dynamic value in the name and the site in the item to update if you want to update it, if not you can add whatever action you need there.
Hope this helps.
If this posthelps, then please considerAccept it as the solutionto help the other members find it more quickly.