The answer to the question is not as simple as it should be.
First, If you have a LEGO Mindstorm Ev3, use this robot with the RCX Program challenge.
Second, if you have to buy a new robot, there are 2 robots to chose from. The LEGO SPIKE Prime or the LEGO Robot Inventor. These robots are essentially the same robot, just packaged different. The LEGO SPIKE Prime is sold through LEGO Education, while the LEGO Robot Inventor is sold through LEGO.com on the retail side.
Compare SPIKE Prime vs Robot Inventor
Both robots are acceptable to use with the RCX Program. We do recommend no matter which robot you buy, you also purchase the LEGO SPIKE Prime Expansion set