The article focuses on optimizing gamification in mathematics lessons by emphasizing the distinction between mathematical modelling and mathematical problem solving and highlighting key factors for effective implementation. Topics include the importance of grounding mathematical concepts in real-world experiences, and the four-step process for integrating gamification into mathematics education, illustrated with examples of prime and composite numbers.