This investigation explores the solution of governing differential equations for free vibration behavior of size-dependent functionally graded (FG) structural members by solving the governing differential equations under various material distributions and boundary conditions. The Euler-Bernoulli beam theory is employed to model the beam, while Eringen&rsquos nonlocal elasticity theory and the Nonlocal strain gradient theory incorporate small-scale effects. The beam, resting on a Winkler-Pasternak elastic foundation, is analyzed in both intact and multi-cracked configurations. Material properties are assumed to vary continuously along axial, transverse, or both directions, following power-law and exponential distributions. The frequency parameters are determined using an analytical approach and the Rayleigh-Ritz method, with results validated through convergence studies and comparing with existing results in special cases. The study systematically examines the influence of crack severity, crack location, size-dependent parameters, power-law exponents, material inhomogeneity constants, and elastic foundation parameters on the frequency parameter. These findings provide valuable insights into nanomechanics and contribute to the design and optimization of nanoscale structures in aerospace, mechanical, and biomedical applications, ensuring enhanced structural integrity and performance.