This is going to vary based o the setting choices your school/institution has chosen for Canvas...
You may be able to go into the old course and post an announcement.
You may be able to use the Canvas inbox to send a message to all students of that previous course
You may be able to use your school's student information system (not Canvas) to send emails to the students.
You may be able to use Canvas to get student emails and compose an email manually putting those addresses in a BCC field (for privacy reasons).
You might want to ask someone at your school/institution (probably either in an IT or Communications area) how they'd prefer you handle this. Some institutions may have policies and procedures in place while some may leave things completely up to you.
I teach at a community college. Once my college has closed my courses at the end of the semester, I am no longer able to contact my past students through the Inbox. I found this out this winter when I wanted to contact some of my fall students.
I ended up notifying these students through SIS, which will still send out emails to their college email accounts.