It's probably overheating. I had the same issue playing NBA 2K last year. The most common cause is dust buildup that blocks the airflow, specially if you leave your PS5 in the vertical position. Search on YT for a tutorial of how to clean it, it's quite simple and cheap to do it yourself. If the problem persists, try moving the console to a more well ventilated area.