Hi @Abishan_Parameswaran,
Sounds like it’s a job for Change Streams or their equivalent in the cloud: Realm Database Triggers.
Filter on the updatedFields to make sure firstname or lastname are updated and then send an updateOne command for each match.
Cheers,
Maxime.