Lawyer's fees are very rarely set by law. You can bargain with a lawyer just as you can bargain for anything else you might purchase. That doesn't mean that the lawyer will agree to reduce a quoted fee, but you should feel free to ask. You should also ask whether the quote is based on an hourly rate or is a flat fee.
Clients can also negotiate for the way in which the fee is paid.
The lawyer may want to get a large retainer in advance, but you can ask if the lawyer would be willing to take part in advance and part later. It needn't be the entire fee, which can be greater than the retainer. Usually a retainer is paid in advance, but it may sometimes be paid in installments during the early part of the relationship. It is best to have this retainer agreement in writing and have it be as detailed as possible. If a lawyer asks for a retainer when you have a contingency fee arrangement, the retainer agreement must be in writing.