Hello Abdou,
To remove the Algebraic loop from the model, start by identifying the blocks that form the loop, using the below command:
open_system(modelName);
Simulink.BlockDiagram.getAlgebraicLoops(modelName);
This will highlight the model blocks that are part of Algebraic loop.
Next step is to identify the type of loop. For detailed guidance on identifying the type of loop and resolving them, refer to this documentation: https://www.mathworks.com/help/simulink/ug/remove-algebraic-loops.html .