You need to connect Rx on one device to Tx on the other device, and vice-versa.
So, the connections should be…
Pin 2 on the Uno (Rx) —> Tx pin on the ESP-01
Pin 3 on the Uno (Tx) —> Rx pin on the ESP-01
You need to ensure that your ESP-01 is configured to communicate at the same baud rate.
More info on all of this here…
Pete.