Bug during game crash Nintendo switch

Sometimes during a game the screen turns gray and I can’t do any moves