Hi there - a common cause of this problem with BMWs is loose sway bar links (https://www.yourmechanic.com/article/symptoms-of-bad-or-failing-stabilizer-bar-links). It is also possible that one of the many heat shields has come loose somehow and is rattling. I recommend a noise inspection...