No. Even though your motherboard is LGA1151 it is ONLY compatible with 6th generations CPUs and 7th generation after you update the bios. Your motherboard WILL NOT support 8th, 9th, or any newer CPU generations.
Honestly it's probably not worth looking at 6th or 7th gen CPUs now. The 6th and 7th gen Core i5s only have 4 cores and 4 threads and thus tend to perform poorly in more modern workloads. The Core i7s offer 4 cores and 8 threads and are still somewhat viable, but they still tend to be quite pricey on the second hand market.
You're probably better off just getting a new CPU and motherboard entirely, the RAM could be carried over into a new build, though if it is slow DDR4 eg. 2133MHz it might not be great if you go for an AMD system.