How is endo diagnosed ?

I want to know how do the doctors 100% know someone has endo?

I was diagnosed with pcos last year through an ultrasound where they found loads of cysts and I’m pretty sure I have signs of endo atleast, would they have picked it up on the scan or not ? i have mega back pain a lot, very painful ovary pain to the point I’ve been rushed to hospital to the surgery room as they thought it was appendicitis, my pelvis sometimes feels like it’s on fire and I struggle to stand up straight when I get a bad episode and my periods are very painful and heavy so I’m worried these night show signs of endo but I’m very confused and uneducated about it all, any advice would be appreciated Thanks !