While Masked Language Modeling (MLM) trains BERT on understanding word-level context, Next Sentence Prediction (NSP) specifically teaches the model to grasp the relationship and coherence between two consecutive sentences.
Open the full topic