What the B58 data shows
Our repair pages tie the B58 to the 340i and 440i (F3x), M340i (G20), 540i (G30), X3 M40i (G01), X5 xDrive40i (G05) and M240i. The engine page is BMW B58 engine. These are repairs owners reported, not failure rates. For one chassis in particular, the BMW G20 3 Series Common Problems guide goes through the G20.
Oil filter housing
The plastic oil filter housing cracks and leaks coolant or oil. Owners describe a coolant puddle, a low coolant warning, a smell from the rear right of the engine, and sometimes the housing cracking while the filter cap is being removed. The same part is used on some B48 four-cylinders. Book time cited is about five hours but some shops billed 10 to 12.5, and many quotes add the heat management module, hoses or the water pump. See B58 / B48 Oil Filter Housing (Coolant Leak).
Water pump
Coolant loss, a coolant smell or crust near the front of the engine, and overheating warnings point to the water pump. Early-production engines may need the pump support or housing replaced with the pump because of a design change; a dealer tech in the source thread cites BMW customer-pay time of 2.5 hours for the pump only and 4.9 hours with the support. Ask up front whether your build date needs the support. See B58 Water Pump (Coolant Pump).
Valve cover
The plastic valve cover is replaced as an assembly and the injectors come out, so labor varies widely, roughly 6 to 13.5 hours in these reports. Worldpac book time quoted for a 2017 540i xDrive is 9.8 hours. A G20 owner reports that BMW wanted a high price for the cover while another brand sells the same part number for less. Some B58 cars may be covered by an extended warranty or campaign, so check by VIN. See B58 Valve Cover Replacement.
Service items and smaller repairs
Plugs are the scheduled item and coils only need replacing if they fail (Spark Plugs & Ignition Coils (B58 / B48)). Oil service is the most frequent job, and the correct spec for many G-series cars is 0W-20 LL-17FE+ (Oil Change / Oil Service). On the X3, the rear differential axle seals can seep (G01 X3 Rear Differential Axle Seals), and xDrive cars add fluid and transfer case items (Transfer Case Actuator (xDrive VTG)).
Before you buy a B58 car
Ask whether the oil filter housing and water pump have been replaced, look for coolant crust at the front of the engine, and check for oil seepage at the valve cover edge. Ask a dealer whether any campaign is open on the VIN. The newest X5 with this engine is covered in the BMW X5 G05 Buying Guide: What It Costs to Fix.