The difference is really subtle in which both words are sometimes used interchangeably to some degree.
*You use “dulu” when you want to talk about things that happened or existed in the past. Time is unspecified and more general. It can be 3 years ago, two years ago etc. Contoh: Saya dulu bekerja di rumah sakit. (I used to work at the hospital)
*You also use “sebelumnya” if you want to refer the things in the past. Nevertheless the time is more restricted to the closest time prior to the current things that you are talking about. “Saya sebelumnya bekerja di rumah sakit” ( I previously worked at the hospital) which means before you get the current job, you worked at the hospital. Let’s say you worked at the Supermarket three years ago, at the restaurant two years ago, and at the shop a year ago before you finally get your current job. Then if you want to use “sebelumnya” you say “Saya sebelumnya bekerja di toko ( I previously worked at the shop)” because it’s the closest time, just prior to your current job you are talking about.