I mistakenly bought a motherboard for 8th generation intel core i5 (Gigabyte - B360M H Micro ATX LGA1151), so im wondering if i7 is compatible with this, or if i will need to buy another motherboard
I wish.
Intel is greedy and they will never make intercompatible CPU generations again.
They changed it just to earn more money.
In short ,no ,it is not compatible and you will need a 8th gen mobo.