Google Snake Game Wiki

Classic Mode is the first mode of Google Snake that was created. Apples will appear on screen one at a time, with the new apple spawning in a non-occupied square when an apple is consumed. To beat this mode, you must eat 252 apples. Your first game will automatically be on classic mode.

Yarmi's Guide

To keep things short, the optimal strategy is the shortest path to any apple. If you have fast enough reaction you can turn in time, but if you don't, just go for the middle of the board and turn to the apple as soon you are able to react. In fast mode reacting in time is even harder, so you should practice and keep trying.

This is true for any non-wall mode up to 50 apples.

As for Wall, you should actually prioritize surviving and path finding, as the shortest path to an apple is very likely to be an avoidable death trap. I'd go with this from wall 50, and for any mode 100 or above category.

If you run into a death trap in wall mode that is unavoidable, please join the discord and post it, as it would be considered a bug and should be fixed. An example of one would be where you have to die to get the apple, no matter what, this shouldn't happen.