Wenn Du wirklich nur die Section-Nummer möchtest, dann geht das bei article mit \counterwithin{equation}{section}
\documentclass[ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{mathtools}
\counterwithin{equation}{section}
\begin{document}
\section{Lorem}
Lorem ipsum
\begin{equation}
a^{2}+b^{2} = c^{2}
\end{equation}
dolor sit
\begin{equation}
x^{2}+y^{2} = z^{2}
\end{equation}
\section{Dolor}
Lorem ipsum
\begin{equation}
a^{2}+b^{2} = c^{2}
\end{equation}
dolor sit
\begin{equation}
x^{2}+y^{2} = z^{2}
\end{equation}
\subsection{Sit}
Lorem ipsum
\begin{equation}
a^{2}+b^{2} = c^{2}
\end{equation}
dolor sit
\begin{equation}
x^{2}+y^{2} = z^{2}
\end{equation}
\end{document}
Bei den "größeren" Klassen report und book ist es standard, die Kapitelnummer mitzunehmen.
\documentclass[ngerman]{report}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{mathtools}
\begin{document}
\chapter{Lorem}
Lorem ipsum
\begin{equation}
a^{2}+b^{2} = c^{2}
\end{equation}
dolor sit
\begin{equation}
x^{2}+y^{2} = z^{2}
\end{equation}
\chapter{Dolor}
Lorem ipsum
\begin{equation}
a^{2}+b^{2} = c^{2}
\end{equation}
dolor sit
\begin{equation}
x^{2}+y^{2} = z^{2}
\end{equation}
\section{Sit}
Lorem ipsum
\begin{equation}
a^{2}+b^{2} = c^{2}
\end{equation}
dolor sit
\begin{equation}
x^{2}+y^{2} = z^{2}
\end{equation}
\end{document}
In Deinem Beispiel scheint es aber so, als wolltest Du eine Nummerierung basierend auf der "kleinsten aktuellen Abschnittseinheit". Das ist etwas schwieriger. Siehe z.B. https://tex.stackexchange.com/q/245979/35864, https://tex.stackexchange.com/q/141367/35864 und https://tex.stackexchange.com/q/232051/35864 bei TeX.SX. Ich weiß aber gar nicht, ob ich das für so klug halte. Es kommt mir merkwürdig vor, dass 2.2 vor 2.1.1 kommt.