Problem is: The mosfet is always switched on (electromagnet works) also if arduino dont send 5v into it. (sorry for my english lol) I also tried some other ways how to connect it what i found on this forum but nothing works. I think it can be broken but I am not sure. Thanks for all useful answers!
is just looks like rosin but i dont connect flyback diode so i think u are right it is damaged. Here is my schema i dont know if i did it right i am sorry
Not right. You are using a MOSFET module, not an individual MOSFET component, so just draw it as a rectangle and label it and label it's pins in your schematic.
There is a diode on the module, but I'm pretty sure it's not a flyback diode, so an external flyback diode still required to prevent damage when the load is an electromagnet/relay coil/solenoid/motor/fan/pump etc.
I was skeptical of what you said here, but Google around turns up this schematic: https://protosupplies.com/wp-content/uploads/2020/06/LR7843-MOSFET-Control-Module-Schematic.jpg
Looks like you're right. The diode looks to be there to protect the gate from a negative voltage. It's not a flyback diode; this should be added separately.
Although its absence doesn't quite explain why the MOSFEt doesn't turn off.