[Solved] HC-12 433 MHz to receive a text message

because the serial buffer contains junk data from the last time.

It isn't junk data. If it truly were, you wouldn't have sent it.

How can I clean the buffer after the terminating 'N' is received?

Just like you showed. What you don't seem to have realized yet it is that serial data transmission is slow, compared to how fast the Arduino can read the data.

So, you send somNambula, and 's' arrives, and the Arduino reads and stores it. A whole bunch of loop() cycles later, the 'o' arrives, and the Arduino reads and stores it. A whole bunch of loop() cycles later, the 'm' arrives, and the Arduino reads and stores it. A whole bunch of loop() cycles later, the 'N' arrives, and the Arduino sees it as the end of the packet.

No other data has arrived, yet, so there is nothing to discard.

A whole bunch of loop() cycles later, the 'a' arrives, and the Arduino reads and stores it. And, the cycle repeats until the next 'N' arrives.

You need to understand what "end of packet" means. It does NOT mean "somewhere in the middle of the text" that is to be sent. It means "at the END".