Yes, you can restrict a few users to upload or add a new document by managing unique permission for your library as the following:
- Go to your library > Library Setting.
- Click on
Permissions for this document library
- From the above Ribbon, > Click on
Stop the inheritance.

- Then click to
Grant Permission to provide a unique permission for specific

- Provide the required users and select
View Only Permission Level

OutPut
There is no New document or upload document with View Only Permission Level

Note: You can create a group and add these users and then grant View Only Permission Level for this group instead
to do this one by one for each user.