Am I getting scammed for an ABS light repair?

My ABS light turned on recently on my 2000 Nissan Xterra.
I took it into a shop, they changed my right front brake caliper, brake pads, and brake rotors.
The very same day I got it back from the shop, the ABS light comes on again.
I take it back to the shop, this time it’s the speed sensor on the left front tire. Again, I let them replace it and get my car back.
I called the shop and they are doing a diagnosis right now, but I feel like I am getting scammed.
As this is the first time that I have taken a car into a shop, I didn’t think to ask for the old parts back.
SO: Am I getting scammed? Is this typical of ABS system issues? What steps should I take to avoid dumping more cash into this auto shop?

Any advice would be of great help

"What steps should I take to avoid dumping more cash into this auto shop?"
Go to a different shop.

I wouldn’t say it’s a guaranteed scam. It could just be that your mechanic is an idiot. Either way, don’t let them do any more work to the car and take it somewhere else.

This wouldn’t be a chain shop by any chance, would it?

You didn’t take your car to a mechanic , you took it to a parts changer . Not uncommon these days .

At 17 years of age with ? miles I give the shop the benefit of the doubt as it could well be that there is or was more than one problem with the braking system.
None of us were present nor have any of us seen the worn or damaged parts.

The shop should gladly show you the faulty parts.

To elaborate on the comments above. The first time they changed pads and rotors, probably did not have anything to do with the ABS. Now whether you needed these done or no is a whole different discussion. Difficult to say on the internet.

Right now, you need someone with a good code reader to figure what is wrong with the ABS and change ONE specific part that is broken. Sometimes the most difficult part is finding the right mechanic. Ask around for references.