In short. the MSI Bazooka B150M and Intel i5-8400 CPU is not compatible.
As bjornl said
"Coffeelake CPUs do use a 1151 socket, but the pin out is different. If you want a coffeelake CPU you will need a 300 series motherboard"
You can buy any Intel 8'th generation 370 chipset motherboard for some around $100-150.
Thanks for reading my answer, hope it helps (sorry for my bad english)