Adding an online cluster to a local replica set

Can a local database and an online cluster be added to a local replica set? If yes, how to do it?
If not, I would like to find a way to make my local database automatically update the remote cluster each time there is a change.
Thank you so much for your attention and participation.