This paper provides a general formularization of the nonlocal Euler–Bernoulli nanobeam model for a bending examination of the symmetric and asymmetric cross-sectional area of a nanobeam resting over two linear elastic foundations under the effects of different forces, such as axial and shear forces, by considering various boundary conditions’ effects. The governing formulations are determined numerically by the Generalized Differential Quadrature Method (GDQM). A deep search is used to analyze parameters—such as the nonlocal (scaling effect) parameter, nonuniformity of area, the presence of two linear elastic foundations (Winkler–Pasternak elastic foundations), axial force, and the distributed load on the nanobeam’s deflection—with three different types of supports. The significant deductions can be abbreviated as follows: It was found that the nondimensional deflection of the nanobeam was fine while decreasing the scaling effect parameter of the nanobeams. Moreover, when the nanobeam is not resting on any elastic foundations, the nondimensional deflection increases when increasing the scaling effect parameter. Conversely, when the nanobeam is resting on an elastic foundation, the nondimensional deflection of the nanobeam decreases as the scaling effect parameter is increased. In addition, when the cross-sectional area of the nanobeam varies parabolically, the nondimensional deflection of the nonuniform nanobeam decreases in comparison to when the cross-sectional area varies linearly.