Sometimes it works for a moment and then it happens again, i tried with 2 different sets of wires soldering and not soldering as well but all to no avail
It would be pollite to comment on helping people's questions. Did you or did you not figure out whether the 3.3 V versus 5 V was the issue? Have you fed your 3.3 V device with 5 V signals? Or in any other sense ignored the different voltages?
Your Fritzing image shows that the rfid device is powered from the 3.3 V pin on the Arduino, but the datapins go straight from the Arduino to the rfid device without a level shifter. A logic HIGH means that the rfid device receives 5 V on a data pin. Check with the specs if that's okay. For what I know, it may not be okay and might cause the kind of problems you encounter.
I typically avoid these posts for a few days then read to see if they ran out of air, or, if they are still treading water after the ship capsized.
Typically once the homework assignment is past due, the post becomes historical, or hysterical.
I couldn't help but think of Dire Straights
Money for nothing and your code for free
no that is not the problem