You have a 70 Ω resistor (R8) in series with the coil and that will stop the relay operating. Given that the relay coil has about 70 Ω internal resistance, the external resistor will effectively prevent anything other than about 2.5 volts being applied to the relay coil. Hence, it doesn't work. [![enter image description here][1]][1] Picture from [here](https://pdf.voron.ua/files/pdf/relay/JQC-3F(T73).pdf). The coil power is about 0.4 watts and, from 5 volts that means it needs to take about 80 mA hence, it's internal resistance will be about 5/0.08 Ω = 63 Ω. The BS170 MOSFET will drop a little bit of voltage but, to me, the big show-stopper is R8. [1]: https://i.sstatic.net/wy9Sp.png