I am trying to understand how I can connect my IR sensor so that it can send the information to the mofset module and therefore the motor that is connected to the mosfet, turns off or on.
I'm going to share the photo of my initial circuit, to see if you can help me with the connections
What is the output pin voltage for your MCU board? If 3.3V, it won't be enough to turn the IRF520 on, needs 5V as minimum and still may not start the motor. IRF520 is NOT a logic level MOSFET.
Post a link for that MOSFET module and the IR module.
Hmm, if the photo was focused we might stand a chance of determining what that strange CPU board actually is.
My understanding of the IRF540 datasheet and the popularity of these modules sold for "Arduino" is that it will control that motor quite OK at 5 V drive, certainly not at 3.3 V.