Your dérailleur hasn't broken. The dérailleur hanger has broken. This is part of the frame so you need to make sure you get the correct one to fit you frame. All hangers will work with the sram dérailleur.Only one hanger will work with your frame. This is why most bike shops won't have the part you need.
I understood this part. But they were not of any help. I specifically asked for a similar part even if it's not the same. They had no clues.
Hopefully, drilling a hole by myself to fix it to my bike was the simplest option.
I can't remember more than a few of time where the bike shops were useful in my 3 years of ebiking experience.
The only time they helped me were when I had punctures and need new inner tubes. and it has always been significantly more expensive than online.
Other than that, online has always been cheaper and more helpful than these shops.