5. Let the complex number $z=3 \cos \theta+2 \mathrm{i} \sin \theta$,

then the maximum value of the function $y=\theta-\arg z\left(0<\theta<\frac{\pi}{2}\right)$ is $\qquad$.
Given 
$\arg z=\arctan \left(\frac{2}{3} \tan \theta\right)$, then $\tan y=\frac{\tan \theta-\frac{2}{3} \tan \theta}{1+\frac{2}{3} \tan ^{2} \theta}=\frac{\tan \theta}{3+2 \tan ^{2} \theta} \leqslant \frac{1}{2 \sqrt{6}}=\frac{\sqrt{6}}{12}$, equality holds when $\tan \theta=\frac{\sqrt{6}}{2}$. Therefore, the maximum value of $y$ is $\arctan \frac{\sqrt{6}}{12}$.