According to the method in
https://planetmath.org/exampleofcohomologyandmayervietorissequence
The Mayer-Vietoris sequence
$0\rightarrow H^m(S^{n-1})\rightarrow H^{m+1}(S^n)\rightarrow0$.
is obtained. I understood by this short exact sequence the isomorphism
$H^{m+1}(S^n)\simeq H^m(S^{n-1})$
is obtained. By induction,
$H^p(S^n)\simeq H^{p-n+1}(S^1) \simeq \delta_{p,n}\mathbb R$ ($\because H^1(S^1)=\mathbb R$).
But I don’t understand why this reduction formula is not valid for $p=n-1$. In this case, $H^{n-1}(S^n)\simeq H^0(S^1)$ and since $H^0(S^1) = \mathbb R$, I conclude that $H^{n-1}(S^n) = \mathbb R$. Why is it not correct?
The correct answer is \begin{equation} H^p(S^n) = \begin{cases} \mathbb R & p = 0,n\\ 0 & \text{others} \end{cases} \end{equation}
The exact sequence holds for $m >0$, not for $m=0$. Because the beginning of the long sequence is $0 \to H^0(S^{n+1})\to H^0(A) \oplus H^0(B) \to H^0(S^n) \to H^1(S^{n+1})$, but $H^0(A)$ and $H^0(B)$ are not zero (they are $\simeq \mathbb{R}$) and the range of $ H^0(A) \oplus H^0(B) \to H^0(S^n)$ is not zero (actually it is all $H^0(S^n)$)