Everyone has the duty to avoid accidents, at all times.
When you change lanes, you have more than the normal duty: You have to check that the other lane is empty, that there is no slow traffic in front of you in that lane that you would bump into, and that there is no fast traffic behind you in that lane that would bump into you. You even have to check the next lane if there is one, because if there is a good gap that you can enter, someone might try to enter that gap from the other side just as you want to change lanes.
On the other hand, that doesn't give others free license to run into you when you try to change lanes. If you set your indicator to switch into a sufficient gap in my lane, and I accelerate intentionally to stop you from entering that gap, an accident may very well be my fault. Even if I don't do it intentionally, if I see you entering my lane I cannot just continue and drive into you, I have to brake instead. (If you set your indicator to switch into an insufficient gap, I also have to try to avoid an accident, but it would likely be your fault if I fail).
So it's not automatic who is at fault, it depends on the situation.
In Germany, the rule is that if you drive fast (faster than 80mph on the motorway), you must expect other drivers to make mistakes. For example, if you see a car close behind a lorry, you must expect that the car might start overtaking and drive into your lane, even though you are approaching at high speed and this is dangerous. You have to be prepared for this, and if you're not, an accident is at least partially your fault.