2.10 STEP 4 doesn't work

Before running the program after compiling, you should source the terminal:

source ~/ros2_ws/install/setup.bash