To listen while Audacity is recording, enable what is known as software or hardware playthrough as explained below.
1. If you use software playthrough and want to listen to the input without recording it, you must also left-click in the Recording Meter Toolbar to turn on monitoring.In the Recording section on the left, put a checkmark in the “Software Playthrough” box and click OK.
You can also turn Software Playthrough on and off in the Transport > Transport Options menu. This type of playthrough has latency, so you will hear what you are recording a noticeable time afterwards. You could also experience audio breakup.