If $m$ is prime that all solutions of the quadratic equation will be found that way. But consider
$$
(x- 2)(x-1)\equiv0\pmod6.
$$
This has four distinct solutions: $0,1,2,4,5.$ When $x\equiv4$ then $(x-2)(x-1)\equiv 2\cdot3\equiv0$ and when $x\equiv5$ then $(x-2)(x-1) \equiv 12\equiv0.$
The reason this can happen with a composite number like $6$ is you can multiply two non-zero numbers and get $0,$ thus $2\cdot3\equiv 0.$
The usual quadratic formula works when the modulus is an odd prime number (as opposed to the one even prime number, $2$), except that dividing by $2a$ has to be construed as multiplying by the multiplicative inverse of $2a$ modulo the prime number in question, and instead of saying $b^2-4ac$ is positive, you have to say $b^2-4ac$ has a square root. Half of all non-zero (congruence classes of) numbers will have square roots.
\;(mod \; m)
I changed it to\pmod m
, which achieves the same result more simply except that $\bmod$ is not italicized. Not that if more than one object is to be included in the parentheses after $\bmod,$ then you need $\big{$braces$\big}$, thus:\pmod{43}
yields $\pmod{43},$ whereas\pmod43
yields $\pmod43.$ Note also the typographical difference between $k|m$ and $k\mid m,$ the latter coded ask\mid m
. Likewise there is the symbol $k\nmid m,$ coded ask\nmid m
. $\qquad$ – Michael Hardy Aug 06 '20 at 17:38