The fabric tells you first
By the time a needle physically breaks it has usually been failing for a while: a needle track in the fabric, a repeating dropped stitch in the same wale, a change in fabric appearance on one section. Operators often notice the mark and adjust around it. The mark is the warning, and it is worth logging rather than working around.
Common causes worth checking
Damage from a previous break left in the cylinder or dial. A worn or damaged sinker or cam, which loads the needle in a direction it is not designed to take. Yarn tension set higher than the fabric needs. Contamination and lint build-up in the needle track. Insufficient or wrong lubrication. A needle that is simply past its service life while the rest of the set is not.
Replacing one needle versus the set
Fitting a single new needle into a worn set is a false economy in most situations: the new needle sits in a track shaped by worn parts and takes load the others no longer take. Whether to replace the set depends on how far through its life the rest is, which is a measurement question — and one worth answering deliberately rather than by feel.
After a break, before restarting
Check the cylinder or dial track for damage at the break point, check the neighbouring needles, check the sinkers and cams in that section, and remove any fragment before running. Restarting on a damaged track is how one broken needle becomes several.