From the end of September, Transport for Wales and Network Rail will be carrying out essential maintenance work.