If your application is refused, all filing fees are forfeited and cannot be recovered. The pending trademark rights that ran from your filing date do not convert into registered rights, and any benefits tied to a pending application, such as Amazon Brand Registry enrollment, may be revoked.
During the examination process, you can respond to office actions received by an examining attorney, but after a final refusal, you can only appeal the decision to the relevant tribunal (for example, the TTAB in the US, or the EUIPO's Board of Appeal). If the appeal also fails, a new application must be filed. Before refiling, it is worth addressing the specific grounds for refusal: adjusting the mark, narrowing the goods and services list, or gathering evidence of acquired distinctiveness.