Is an isobar the same as an isotope? I am a little bit confused about what an isobar is. Its online definition is that it's an element with the same number of neutrons but a different number of protons from an element $\ce{X}$.


To me, it doesn't make sense from the get-go, because once you change the number of protons the element changes as well so why exactly is it defined as the same element $\ce{X}$ with the same number of neutrons and a different number of protons.
Definition of an isotope: An isotope is an element $\ce{X}$ with the same number of protons and a different number of neutrons.


So to the actual question now. Isn't an isobar just an isotope? Here is an example to clarify what I mean.
If we take for example carbon $\ce{^12C(p:6, n:6)}$ and turn it into an isotope it will be $\ce{^13C(p:6, n:7)}$, and that makes sense, but if we turn it into an isobar it would be $\ce{^13C(p:7, n:6)}$, which doesn't make sense, because it looks exactly like an isotope of nitrogen $\ce{^13N(p:7, n:6)}$.

If the atomic number changes than the element changes as well. So isn't an isobar just an isotope of the following element with a smaller neutron number?
Not quite, an isotope has same number of protons ($ A- N = Z = \mathrm{constant}$), but a different number of neutrons ($\mathrm N$ varies; e.g. $\ce{^3_\color{red}{1}H}$ and $\ce{^2_\color{red}{1}H}$, or $\ce{^235_\color{red}{92}U}$ and $\ce{^238_\color{red}{92}U}$ are isotopes).

An isobar has a fixed number of total nucleons ($Z + N = A = \mathrm{constant}$; e.g. $\ce{^\color{red}{40}_19K}$ and $\ce{^\color{red}{40}_20Ca}$, or $\ce{^\color{red}{3}_2He}$ and $\ce{^\color{red}{3}_1H}$ are isobars). Not nearly as mainstream as isotopes, but isobars are important to consider when doing mass spectroscopy.

Extra fact: For nuclei of the same number of neutrons ($A - Z = N = \mathrm{constant}$), the term is isotones.