When data logging, the memory available for data is not infinite, so the micro:bit will stop logging when the log file is full. If you are using a MakeCode program a 928 error will be shown on the display when the log is full.
To avoid the error, you can also tell your program what to do when the log is full. For example, you could delete the log data and start again or show something else on the LED screen.
MakeCode
The 'on log full' block in the Data Logger extension lets you choose what to do when the log is full.