beforeSubmit
for modifying the record being saved;
afterSubmit
for affecting changes to other records based on teh submit (email notifications, send data to external systems, etc):
https://www.youtube.com/watch?v=-fh7UiSuzMQ&list=PLG2tK6Va2WUCseA3viGC2oYPkyA45wfA-▾