While elderberries are a fruit, they are actually low acid which can be problematic for canning.
There are some guidelines and instructions to make elderberry jam or jelly safely at www.rrc.k-state.edu/preservation/doc/july-august-presnews2021.pdf.
Do not use low or no-sugar pectin as sugar is critical for safety. Do not replace any sugar with honey.
Freezing is always a safe option for preserving elderberries.