Are elliptical orbits caused by he centripetal force on the the orbiting planet, giving it momentum energy the closer it is to the star it orbits around? or is there some other explanation?

Elliptical orbits are caused by the inertia of the orbiting body wanting to go in a straight line, and the gravity of the main body opposing that.

Central forces necessarily conserve angular momentum about the center. Equal and opposite forces also conserve angular momentum about any point. Therefore both in the approximation of the sun as a fixed body and the full treatment of the two-body problem in Universal Gravitation, orbits conserve angular momentum. So necessarily when the objects are closer together, they need to be moving faster to conserve angular momentum. \(\omega = \frac{d\theta}{dt} = \frac{L}{mr^2}\) with L being the initial angular momentum. Now the force in Universal Gravitation is proportional to the inverse of the square of the distance separating the bodies, so one can establish a relation between angle and separation based on the form of the relation. As it turns out, the proportionality, \(F \propto r^{-2}\) is exactly what is needed for orbits to be conic sections (which includes ellipses). The form of the orbit is determined by initial energy and angular momentum of the orbiting body. \( m \frac{d^2 r}{dt^2} = - \frac{GMm}{r^k} + \frac{L^2}{m r^3} \) \(u = \frac{1}{r} \quad \Rightarrow \quad m \frac{d^2 }{dt^2} \frac{1}{u} = - GMm u^k + \frac{L^2 u^3}{m}\) \( \frac{d \quad}{dt} = {L u^2}{m} \frac{d \quad}{d \theta} \quad \Rightarrow \quad - {L ^2 u^2}{m} \frac{d^2 u}{d \theta^2} = - GMm u^k + \frac{L^2 u^3}{m}\) \( \frac{d^2 u}{d \theta^2} + u = \frac{G M m^2 }{L^2} u^{k-2}\) Since \(k=2\) we get \( \frac{d^2 u}{d \theta^2} + u = \textrm{Constant}\) which is the equation of a conic section.

It's so obvious, the gravity is stronger the closer the orbiting object is to the sun, this causes the sun to whip it around harder and throw it far away making the sides of the orbit longer then the turns. For near circular orbits this effect is smaller. The stronger gravity accelerates the planet when its closer to the star, then it balances when the faster moving planet pushes out to where gravity is weaker at which time it slows down and is drawn in closer again repeating the process. The balance of these two motions causes the elliptical orbit shape.

try wikipedia before posting about well-understood phenomena: https://en.wikipedia.org/wiki/Elliptic_orbit

I think its funny that there are other forums with this same question and like hundreds of people say elliptical orbits are caused by surrounding gravity fields or something else.

You can create a mathematical model universe that only contains a fixed Sun in the centre and a single planet orbiting it. Choose an initial position and speed for your planet, and set it moving in a particular direction. Assume that only the force of gravity acts centrally between Sun and planet and that the gravitational force goes as the inverse-square of the distance between Sun and planet. Depending on the initial position and velocity you choose there are only a few possible outcomes for the shape of the planet's trajectory: a hyperbola, a parabola or an ellipse. Note also that a circle is a special case of an ellipse. This model universe shows you that no other force is necessary to create an elliptical orbit. The single gravitational force between Sun and planet will do just fine.

BTW -- I made a typesetting mistake earlier in the following line: \(\frac{L u^2}{m} \) was entered as \({L u^2}{m}\). Likewise \(\frac{L ^2 u^2}{m}\) was entered as \({L ^2 u^2}{m}\) where the only sign of the intent is the slightly weird mistypesetting of the baseline of the m relative to the u and of course that units don't match. Going a little slower: Because \(u = \frac{1}{r}\) and \(L = m r^2 \frac{d \theta}{dt}\), \(\frac{d \theta}{d t} = \frac{L u^2}{m}\) and if \(f = \frac{m}{u}\) and \(g = \frac{df}{dt} = - \frac{m}{u^2} \frac{du}{dt} = - \frac{m}{u^2} \frac{du}{d \theta} \frac{dt}{d\theta} = - L \frac{du}{d \theta}\) then \(\frac{dg}{dt} = \frac{dg}{d\theta} \frac{d \theta}{dt} = -L \frac{d^2u}{d^2\theta} \frac{d \theta}{dt} = - \frac{L^2 u^2}{m} \frac{d^2 u}{d^2\theta}\). Or \(m \frac{d^2 }{dt^2} \frac{1}{u} = - \frac{L^2 u^2}{m} \frac{d^2 u}{d^2\theta}\). So the correct expression reads: \( \frac{d \quad}{dt} = \frac{L u^2}{m} \frac{d \quad}{d \theta} \quad \Rightarrow \quad - \frac{L ^2 u^2}{m} \frac{d^2 u}{d \theta^2} = - GMm u^k + \frac{L^2 u^3}{m}\) Bye for now.