As I said, factory pattern is used when you want to create object without exposing creation logic while Builder pattern is used when constructor accept too many arguments and most of them are optional.
In other words, the Builder pattern is used when we want to create objects that require the step-by-step initialization of many attributes.
The Builder pattern provides a way to create an object by calling a series of methods that set the required attributes. It’s useful when we have a complex object with many attributes that need to be initialized in a particular order.