However, when I run the same code on VS Code on my own computer, I encounter this error
It's a linker error, i ran the code on my side and it's working fine, can you share how you are trying to run the code in VS code, If you have gcc installed on your system, you can link all of them together like so,
gcc main.c student_data.c student.c -o a.out
And then try running the executable a.out