This paper presents and analyzes a new viscosity approximation method with the inertial technique for finding a common fixed point of a countable family of nonexpansive mappings and then its strong convergence theorem is established under some suitable conditions. As a consequence, we employ our proposed algorithm for solving some convex bilevel optimization problems and then apply it for solving regression of a graph of cosine function and classification of some noncommunicable diseases by using the extreme learning machine model. We perform a comparative analysis with other algorithms to demonstrate the performance of our approach. Our numerical experiments confirm that our proposed algorithm outperforms other methods in the literature.