This Torx screw is what mounts the wheel hub / wheel bearing to the suspension spindle/upright. It screws in from the back of the suspension upright (usually 4 required per hub). BMW suggests replacing these screws with any new hub. It's a M12x1.5 thread with 45mm length and Torx/ISA head.
Wheel bearings on these cars were mounted with either this M12x1.5 bolt or a M12x1.25 bolt. Bearings/hubs and bolts must be matched together so you may not be able to re-use your existing bolts on a new hub. If your wheel bearing dates back to before 2017 it likely has the 1.5 thread pitch.
BMW Fitments:
X5 Series
E70 X5 (07-13) > X5 3.0si (07-10)
E70 X5 (07-13) > X5 4.8i (07-10)
E70 X5 (07-13) > X5 M (10-13)
E70 X5 (07-13) > X5 xDrive35d (09-13)
E70 X5 (07-13) > X5 xDrive35i N55 (11-13)
E70 X5 (07-13) > X5 xDrive50i (11-13)
X5 Series
F15 X5 (2014-2018) > X5 sDrive35i (14-18)
F15 X5 (2014-2018) > X5 xDrive35d (14-18)
F15 X5 (2014-2018) > X5 xDrive35i (14-18)
F15 X5 (2014-2018) > X5 xDrive50i (14-18)
X5 Series
F85 X5 M (2015-2018) > X5 M (15-18)
X6 Series
F16 X6 (2015-2019) > X6 sDrive35i N55 (15-19)
F16 X6 (2015-2019) > X6 xDrive35i N55 (15-19)
F16 X6 (2015-2019) > X6 xDrive50i (15-19)
X6 Series
F86 X6 M (2015-2019) > X6 M (15-19)