Thanks to the link provided by @TomC I scrolled to the bottom and it says your particular model unfortunately only transmits and receives MIDI data, not audio so you will have to take another approach.
The simplest (and cheapest) approach is to send a line from the headphone output of the keyboard to the computer’s microphone input. You may need to buy a ...
According to the manual for computer-related operations:
You can record your keyboard performance as audio data to a Music Production software on your computer. For more detailed instructions, refer to the Owner’s Manual supplied with your instrument.To transmit audio data, you will need to install the Yamaha Steinberg USB Driver to your computer.
You may consider the following two-step approach:
Record the MIDI messages from the digital piano.
Render the MIDI to an audio track.
Step 1 means that instead of recording the sound that has already been rendered by the MIDI synth on the piano itself, you record the MIDI messages. I'm not familiar with that particular piano, so I don't know if a regular ...
The PSR-EW300 does not let you add sounds to its internal library, however it can act as a midi controller so you can trigger samples with it. The manual has info on how to use the USB to HOST connector for this.