deploy replicas on multiple VMs
Please follow the steps from the below links, If you face issues in setting up the replica set or any questions on the blog. Please add a comment with your issues.

How to Setup MongoDB Replication

Deploy a Replica Set