It's a tradition and the pens are given out later as souvenirs. From this TIME article:
The rationale is fairly simple. The pen used to sign historic legislation itself becomes a historical artifact. The more pens a President uses, the more thank-you gifts he can offer to those who helped create that piece of history. The White House often engraves the pens, which are then given as keepsakes to key proponents or supporters of the newly signed legislation.
During President Trump's first signing ceremony, he used multiple pens too, later given to the Members of Congress who had attended.

(The pens are placed on Trump's right.)
Source: https://us.cnn.com/videos/politics/2017/01/20/donald-trump-first-law-pens-orig-mg.cnn/video/playlists/atv-road-to-the-white-house-automated/
President Obama famously used 22 pens to sign Obamacare into law. The White House released a video then explaining the tradition.
Obama used 22 pens to sign health care reform legislation into law in March of 2010. He used a different pen for each letter or half letter of his name. "This is gonna take a little while," Obama said.

Source: https://www.washingtonpost.com/graphics/national/obama-legacy/obamacare.html
Recently, Speaker Nancy Pelosi also used multiple pens when signing the articles of impeachment during Trump's first impeachment.

Source: AP Photo
This tradition dates back at least to President Franklin D. Roosevelt.