If it was a Behr OEM Expansion tank, 8 months is right on time for failure. Easy check is, when fully cold, to stick your hand under the expansion tank and feel for coolant.
The Behr ones have been made in China very badly, I had two fail both ~8 months. The fix is have a genuine BMW one fitted, if your shop deals with a few 540i they will have had this issue already.
An e39 is like a beautiful wife, needs constant attention, lots of money, lets you down at the worse times but you’d never be without it.