Need help in understanding some auto generated files

Also, i just realized one thing. I have recently installed homemanager. But i made change inside the configuration.nix instead of home.nix file. and i guess i gave the command

home-manager switch --flake.

instead of

sudo nixos-rebuild switch --flake .

or may be the other way round. i couldn’t get that from histry too.
please correct me if im giving the wrong command, or this might be the issue of that weird behavior
To be more clear on my current configuration mess and unclear usage of commands which i have did in the past, i have explained it over here