Is this linearization process (of if constraint) correct?

No.

Look at Section 2,8 of “FICO Xpress Optimization Suite MIP formulations and linearizationsQuick reference” https://www.artelys.com/uploads/pdfs/Xpress/mipformref-1.pdf .

And by the way, make M as small as possible, i.e., as tight a bound as possible. A large value of M can cause numerical havoc in the solver.