I do not have a full answer, but I can show that such an example cannot be a $p$-group. It seems challanging to generalize this to nilpotent groups.
Claim: among the (finite) $p$-groups, $G\cong C_{2^n}$ are the only examples.
Proof: If $p\
eq 2$, then the order of every nontrivial normal subgroup is divisible by $p$, so the sum of orders is congruent to $1$ modulo $p$. Hence, it cannot be $2|G|-1$. If $p=2$ and $G=2^n$, then there exists a normal subgroup in $G$ of order $2^k$ for every $0\leq k\leq n$. As the sum of these orders is $2^{n+1}-1= 2|G|-1$, there must be exactly one of each. In particular, there is a unique maximal normal subgroup $M\triangleleft G$, and thus any element $g\
otin M$ generates $G$.