Second this.
https://www.atlassian.com/git/tutorials/merging-vs-rebasing
You should also set it in your got config to pull.rebase true to avoid fast forwarding and other issues without being aware of how changes on main actually affect your branch changes and resolving them yourself so that your changes make actual sense when going into main.