When a user runs cargo build command it automatically creates a file named as Cargo.lock to keep track of dependencies in the user application.