I have a question i am fully aware that the max EV is 510 and 252 is max for 1 stat

And im kinda confused with the EV calculation

So, lets say i kill a Staravia which gives 2 Speed Stat EVs

is that 2/510?

Also, once i've used my 510 EVs, now what? what happens if I exceed past 510 because once i hit 510 obviously i still need to level and I cant control the fact that it will exceed the limit