How can i make a snake following my player without any lag, when moving on a grid?

Just a thought - you could check this thread out

@Keith_1357 s algorithm there could work here