Access modem without affecting ddns

Could someone help me with a question? I need to access my modem at ip, I know that if I set up a network on the wan port with ip I can access normally but this causes my ddns address to be a problem and instead of pulling the external ip it It starts pulling the IP that I set to access the modem, is there a correct way to make this change? that does not affect the ddns?