Extract last 4 digits of student phone

I’m working on a student datasheet on stackby for their results and I’d like to assign a unique ID to each student. I’m planning to extract the last four digits of their phone numbers and merge this data with other columns. Could someone help me with this?