Does M.2 slot supports PCIe device?

If I connect a Hailo-8 M.2 M-Key board to the M.2 slot of an X4 board, will it be recognized properly on Windows or Linux?

You will need some kind of adapter/extender to fit that properly, X4 has m.2 2230 slot, hailo m.2 card is 2242 (slightly larger). On the other hand nothing blocks that slot from this side, so You can just use double sided tape and use usb-c port to glue it together.
Hailo needs 2-4x pcie 3.0 (depending on version). You can get bigger (more expnesive), 4x pcie version, almost all are 2242.