Run mongodb as a replica set member by default when Window starts

Hi, I am a Windows user and I am using transactions with mongodb and I have to stop the mongodb service by:
net stop mongodb
and run as a replica set member like this:
mongod --replSet rs0
mongod is an alias for my file path to mongod.exe

I was just wondering whether there is a more efficient way to start mongodb service as a replica set member by default without being required to stop and run again because I use transactions quite offenly.

I tried to edit the mongod.cfg by adding the following lines which I found in the docs:

  replSetName: rs0

but that did not work at all. When I edit this, I have to restart my PC because mongod also stops working after I edit this, and when I restart my PC, it gets fixed by itself.

Really stuck!!

You will need to share the logs so that we can help. There is not enough information in your current post.