If $p > n/2$ and if $f \in C^2_c (\mathbb{R}^n \setminus \{0\})$ (twice continuously differentiable functions whose support is compact in $\mathbb{R}^n \setminus \{0\}$), then the weighted Hardy inequality to $f$ says that $$ \int_{\mathbb{R}^n} \frac{| f (x) |^p}{| x |^{2 p}} \,dx \le \Bigl(\frac{p}{2 p - n}\Bigr)^p \int_{\mathbb{R}^n} \frac{| \nabla f (x) |^p}{| x |^{p}} \,dx $$ Next an application of the classical Hardy inequality gives you, if $p \ne n$, $$ \int_{\mathbb{R}^n} \frac{| \nabla f (x) |^p}{| x |^{p}} \,dx \le \Bigl(\frac{p}{p - n}\Bigr)^p \int_{\mathbb{R}^n} |D^2 f (x) |^p \,dx. $$
If $p \in (n/2, n)$, then such functions are dense in the subspace of $W^{2, p} (\mathbb{R}^n)$ of functions that vanish at $0$, and this proves the desired inequality.
(Edit) For a reference for the Hardy inequality, see for example M. Willem, Functional analysis: Fundamentals and applications, 2013, Theorem 6.4.10; the proof adapts immediately to the weighted case and $p > N$.
If $p > n$, then the inequality $W^{2, p} (\mathbb{R}^n)$ of functions that vanish at $0$ together with their derivative. It is important that the derivative vanishes as it can be checked that if $f \in C^2 (\mathbb{R}^n)$ and $f (0) = 0$, then $$ \frac{| f (x) |^p}{| x |^{2 p}} \simeq \frac{\rvert \nabla f (0)\lvert}{|x|^p}, $$ which is not integrable near the origin $0$ when $p > n$.
(Edit) For $p = n$, the inequality fails. In that space the condition that the derivative vanishes at the origin does not make any sense. A counterexample that vanishes at the origin is obtained by considering the family of functions $f_\alpha$ define by $$ f_\alpha (x) = |x| \Bigl(\log \frac{1}{|x|}\Bigr)^\alpha \eta (x), $$ where $\eta$ is a cutoff function that is a nonzero constant in a neighbourhood of the origin and $-\frac{1}{p} \le \alpha < 1 - \frac{1}{p}$.