Welcome to the forum. If it is sobriety that you seek, this is a good beginning.
You have to embark on the path to self-mastery. This begins with self-discipline. You need to take a self-inventory, and be brutally honest with yourself. Notice I keep using the word “Self”? Sobriety is about YOU! Your decision. Your walk. Your failures and your victories. If your friends and family are using, you need to get some space between you and them, until such time that you have developed enough self-discipline, have established a sober support network (which can be as few as one or two hardcore sober accountability partners), that you can be around your family. Your friends that are using? DX them.
If you want to be clean and sober, you can be clean and sober. It is 100% your choice, and 100% within your ability to achieve. You just have to decide to get after it, and be willing to do anything, try anything to get clean and sober.
Find a meeting. Work a program. Find a sponsor. Live on this forum. Radically change your life, because it is indeed a matter of life or death. Realize and accept that you have a terminal illness. Addiction will kill you. Maybe slowly. Maybe quickly. But the road only goes to one place: death. Realize and accept that you have the power to send this terminal illness into permanent remission, by getting clean and sober. Something else may get you one day, but you can decide that is won’t be drugs or alcohol.
If it’s important we find a way. If it isn’t, we find an excuse.