UVM Agent

Why we use only one agent in PISO Shift Register?

Typically you will have one agent per interface on your DUT.
So if your DUT has a PISO interface and a APB interface, then you would have one PISO Agent and one APB agent in your testbench environment. The agent is then a re-usable piece of verification IP to move to another project where the RTL code also has as PISO interface.

If your DUT is something really simple like a PISO SHIFT register, then you might choose to have one agent to drive the parallel pins and also monitor the serial output. Alternatively you might separate the parallel pins from the serial pin and have separate agents do those tasks.