Metaheuristic optimization algorithms play an essential role in optimizing problems. In this article, a new metaheuristic approach called the drawer algorithm (DA) is developed to provide quasi-optimal solutions to optimization problems. The main inspiration for the DA is to simulate the selection of objects from different drawers to create an optimal combination. The optimization process involves a dresser with a given number of drawers, where similar items are placed in each drawer. The optimization is based on selecting suitable items, discarding unsuitable ones from different drawers, and assembling them into an appropriate combination. The DA is described, and its mathematical modeling is presented. The performance of the DA in optimization is tested by solving fifty-two objective functions of various unimodal and multimodal types and the CEC 2017 test suite. The results of the DA are compared to the performance of twelve well-known algorithms. The simulation results demonstrate that the DA, with a proper balance between exploration and exploitation, produces suitable solutions. Furthermore, comparing the performance of optimization algorithms shows that the DA is an effective approach for solving optimization problems and is much more competitive than the twelve algorithms against which it was compared to. Additionally, the implementation of the DA on twenty-two constrained problems from the CEC 2011 test suite demonstrates its high efficiency in handling optimization problems in real-world applications.