i actually bought another > module, also an RS485 that is compatible with 3.3V system but the pins are slightly different to that of MAX485. do you guys know if it works the same way with MAX485 module?
If the RS485 module is powered from 3.3v, then you should consult the datasheet for the MAX485 chip to see what the manufacturer says about the supply voltage. Off the top of my head I don't think the MAX485 chip will work at 3.3v.
If you power the RS485 module with 5v and are using a 3.3v system, then you need to reduce the voltage from the RO pin using a level shifting circuit - a potential divider will suffice.
The module in your second image looks like an auto switching RS485 module. That type of module doesn't have/use the RE and DE signals. If the code you are using does drive RE and DE, then you can simply leave the code as is and not connect anything to tbe designated RE and DE pins.