There is a community made guide for getting started with dotfiles1 as well as a subreddit.
A common pattern is to have a git repo that stores the dotfiles and then symlink configs into the proper location. One way to do this is the gnu tool stow2, alternatively some people use Nix3. Finally, you could also use an Ansible role to handle this.
2. Pearce, A. Managing dotfiles with GNU stow. (2016).
3. Pedersen, O. K. Declarative management of dotfiles with Nix and Home Manager. (2021).