Cyclic codes, as a crucial subclass of linear codes, exhibit broad applications in communication systems, data storage systems, and consumer electronics, primarily attributed to their well-structured algebraic properties. Let p denote an odd prime with \(p\ge 5\) , and let m be a positive integer. The primary objective of this paper is to construct two novel classes of optimal p-ary cyclic codes, denoted as \({\mathcal {C}_p}(0,s,t)\) , which possess the parameters \([{p^m} - 1,{p^m} - 2m - 2,4]\) . Here, s is defined as \(s = \frac{p^m+1}{2}\) , and t satisfies the condition \(2 \le t \le {p^m} - 2\) . Notably, we prove that the code \({\mathcal {C}_p}(0,s,t)\) and \({\mathcal {C}_p}(\frac{p^m-1}{2},1,\frac{p^m-1}{2}+t)\) have the same optimality when \(p^m \equiv 1 \pmod {4}\) . On this basis, we obtain several new p-ary cyclic codes from the known ones. Moreover, we show that the code \({\mathcal {C}_p}(\frac{p^m-1}{2},s,\frac{p^m-1}{2}+t)\) achieves the same optimality as the code \({\mathcal {C}_p}(0,s,t)\) . Finally, for the specific case when \(p=5\) , this paper additionally presents four new classes of optimal cyclic codes \({\mathcal {C}_5}(0,s,t)\) .