The nut broke off and had a small red ring/gasket between these connectors. I’m an noob but can follow instructions. Please give suggestions. Thanks

Below there is a water valve Water valve which may be used as an alternative if the above (cupper?) pipe is inconvenient to use.