You can do this using a computer running a sequencer program.
The one I have to hand is Cubase 9.5. Without going into program-specific detail, it allows me to set up markers on the sequencer timeline, and to loop constantly between them while recording data. On eack loop I hear the previously recorded passes as well as what I'm currently playing. When I've built up enough layers, I can drop out of Record mode but continue playing the loop.
You can do this with either audio (as Peter Bence is) or MIDI. The USB port on your Clavinova offers a direct MIDI connection, there are also the older type round MIDI connectors, which will require a MIDI interface add-on for the computer. Or you can connect the audio output of the Clavinova to an audio interface on the computer. (USB does MIDI, not audio).