What is the best way to add optional update in procedure in transaction?
The optimizer uses the sniffed parameter values regardless of your procedural logic. Imagine your proc code with only the DML statements and the parameters in it.
So there is a risk that when the plan is generated, the values to be used for the UPDATE are nonsense values when @IsUpdateA = 0. From a performance perspective, that is. Think of the WHERE clause and selectivity. I.e., the plan is created for that UPDATE (which isn't executed) is based on values that give you incorrect selectivity calculation and as a result a bad plan.
Or the other way around, of course.
I.e., having two procs can give you better estimates and in the end better plans.