22 making around 7-10k a month. Confused on if i should buy a 40k car

So god has blessed me with an amazing job as a insurance broker which i love to do. Now i went from making barely 2k a month to making 7-10k a month. ( i get paid on commission and 7k is my lowest average per month) and i have never owned a car and now i’m in the market looking for a car. I’ve always been a huge fan of BMWs and i’m confused on if i should pull the trigger on a 2020 BMW 540i with 32k miles on it. i’ll be getting an auto loan for around 40k and my credit is at 735. Now the real reason i’m coming on here is because i don’t know if i should buy it or not. My monthly expenses are solely me and my GF phone bill. I live rent free and i just buy groceries so i have a lot of money to play around with and save but ultimately i just don’t know if it’s smart to put myself in 40k debt VS me fulfilling my dream of owning a 5 series so some advice would really help out guys !!!!