A schedule is one interleaving of the operations of concurrent transactions. Run two transfers in the wrong order and the classic lost update appears: both read the old balance, both write back, and one debit silently vanishes — money created from nothing.
Whether a schedule is safe is decided by its precedence graph: draw an edge Tₓ→Tₕ whenever an operation of Tₓ conflicts with a later one of Tₕ (same item, at least one a write). If that graph has a cycle, the schedule is not conflict-serializable — no serial order can reproduce it.
Two-phase locking forbids the bad weaves: each transaction holds its locks until it commits, so a conflicting op must wait instead of corrupting. But waiting has a cost — weave two transactions so each holds a lock the other needs and the waits-for graph closes into a circle: a deadlock. Anomalies and deadlocks are the same thing seen twice: pure facts about the space of interleavings.
The simulation stopped unexpectedly — the lesson continues without it. You can move on; nothing you did was wrong.