In this paper, we are concerned with the existence of infinitely many nontrivial solutions to the following semilinear degenerate elliptic equation \(\begin{aligned} -\Delta _\lambda u + V(x) u = f(x,u) \quad \text { in } {\mathbb {R}}^N, N\ge 3, \end{aligned}\) where \(V: {\mathbb {R}}^N\rightarrow {\mathbb {R}}\) is a potential function and allowed to be vanishing at infinitely, \(f: {\mathbb {R}}^N\times {\mathbb {R}}\rightarrow {\mathbb {R}}\) is a given function and \(\Delta _\lambda \) is the strongly degenerate elliptic operator. Under suitable assumptions on the potential V and the nonlinearity f, some results on the multiplicity of solutions are proved. The proofs are based on variational methods, in particular, on the well-known mountain pass lemma of Ambrosetti–Rabinowitz. Due to the vanishing potentials and degeneracy of the operator, some new compact embedding theorems are used in the proof. Our results extend and generalize some existing results (Alves and Souto in J Differ Equ 254:1977–1991, 2013; Hamdani in Asia-Eur J Math 13:2050131, https://doi.org/10.1142/S1793557120501314, 2020; Luyen in Commun Math Anal 22:61–75, 2019; Luyen and Tri in J Math Anal Appl 461:1271–1286, 2018; Tang in J Math Anal Appl 401:407–415, 2013; Toon and Ubilla in Discrete Contin Dyn Syst 40:5831–5843, 2020).