That’s called a finisher, rear light, (left or right) and is colour coded to the car. It’s available from BMW primed, unpainted, I think. It’s secured on from the factory by adhesive tape. You can pick them up on the ‘Bay sometimes or occasionally on this forum. You should post a “Wanted” thread.
Part numbers:
Left 51717078265
Right 51717078266