For a given Hamiltonian operator $H$, It's possible to approximate its smallest eigenvalue using VQE. Any Hamiltonian is a Hermitian operator. Therefore, for a system with $n$ qubits, the set $S$ of all combinations of $n$-qubits Pauli tensor-products is a basis for all possible $2^n \times 2^n$ Hamiltonians. The dimension $|S|$ of this basis is $2^n \cdot 2^n = 2^{2n}$, and therefore it grows exponentially with the number of qubits.
Let $A$ be the subset of $S$ that is being used to express a given Hamiltonian. Let $m$ be the cardinality of $A$: $m = |A|$. In each iteration of the VQE we run the Ansatz circuit $m$ times - Each time followed by a measurement scheme defined by the Pauli string $A_i$. Put aside the constant shots factor.
How the VQE algorithm manages to scale efficiently, if $|S|$ grows exponentially with the number of qubits $n$? Of course that if $m$ is small enough, then $|S|$ is not a problem. But surely there are many Hamiltonians with large $m$ due to the exponentially growing $|S|$. Is the VQE useful only for Hamiltonians with small $m$? Is there something else maybe I haven't thought of?
Thanks!