EXEC runs a procedure within another procedure. This can also be used to execute dynamic SQL.
sp_executesql allows you to run dynamic SQL within a batch or procedure. sp_Executesql allows you to pass in variables to the dynamic code, as well as pass values back from the dynamic code.
Each has thier use and I won’t recommend forcing one or the other.
<b>Differnece between sp_executesql and exec</b>
exec compiles the code every time and then execute but sp_executesql executes the code without recompiling it.