You can use AtomicLong#incrementAndGet
as a counter. The “Atomic” means the class is thread-safe.
AtomicLong userIdIncrementor = new AtomicLong(previouslyUsedNumber);
Use that object to get incrementing numbers for each new user.
long number = userIdIncrementor.incrementAndGet();
String userId = userName + String.format("%03d", number);
This code assumes you will never have more than a thousand users, with only three digits for the number as you specified in your Question.
For details on formatting an integer, see this Answer.