Let O be the origin. Let
\(\overrightarrow{OP}=x\hat{i}+y\hat{j}-\hat{k}\) and \(\overrightarrow{OQ}=-\hat{i}+2\hat{j}+3x\hat{k}\), \(x,y\in\mathbb{R}\), \(x\gt 0\), be such that \(\left|\overrightarrow{PQ}\right|=\sqrt{20}\) and the vector \(\overrightarrow{OP}\) is perpendicular to \(\overrightarrow{OQ}\). If \(\overrightarrow{OR}=3\hat{i}+z\hat{j}-7\hat{k}\), \(z\in\mathbb{R}\), is coplanar with \(\overrightarrow{OP}\) and \(\overrightarrow{OQ}\), then the value of \(x^2+y^2+z^2\) is equal to :