Hello,
When working on a mod and making changes, do you have to restart the game every time you change something?
It depends what you are doing, but since you're talking about coding, I assume you just mean XML and C#. I believe all XML is modifiable at runtime. That being said you'll still need to figure out when a particular XML file is deserialized or read, and modify it before then. If that xml happens to be loaded at startup, then obviously need to restart.
Now for C# I use Visual Studio, so I don't know if all of what I say works with other IDEs. If you want to modify
your C# code at runtime, then you can set a breakpoint in your IDE, wait for it to be hit, modify, save and continue. In my experience this usually works, but there are exceptions such as modifying delegate functions in some cases or lambda expressions in general. Depending on the context you can also add new methods at runtime. However you can't change or add fields or properties. Generally if you change something when the program is stopped, save and then see magenta squiggly lines, then yeah need to restart, but even VS says your all good, there's still might be a fun and exciting crash to experience ahead, only way to know it to try.