Suppose $\theta = \mu = \sigma^2,$ data are a random sample for a normal distribution with these parameters,
$S^2=\frac{1}{n-1}\sum_{i=1}^n(X_i = \bar X)^2,$ and the pivotal quantity $Q = \frac{(n-1)S^2}{\theta} \sim \mathsf{Chisq}(\nu = n-1).$
Then choose $L, U$ to cut probability $0.025$ from the lower and upper tails, respectively, of $\mathsf{Chisq}(n-1).$
$$P\left(L < \frac{(n-1)S^2}{\theta} <R\right)
= P\left(\frac{(n-1)S^2}{U}<\theta<\frac{(n-1)S^2}{L}\right)= 0.95.$$
Thus a 95% confidence interval for $\theta$ is of the form
$\left(\frac{(n-1)S^2}{U},\,\frac{(n-1)S^2}{L}\right).$
For example, if $n = 10, \theta = 7$ then data might be as simulated in R below:
set.seed(2021)
x = rnorm(10, 7, sqrt(7))
summary(x); var(x)
Min. 1st Qu. Median Mean 3rd Qu. Max.
1.913 7.200 7.937 7.803 9.147 11.577
[1] 6.263132 # sample variance
And the 95% CI for $\theta$ is $(2.96, 20.97),$
9*var(x)/qchisq(c(.975,.025), 9)
[1] 2.963196 20.874096
Note: It seems worthwhile looking at this a little more extensively. The 95% t interval $(6.01,9.59)$ for $\theta$ is noticeably shorter than the CI you propose:
set.seed(2021)
x = rnorm(10, 7, sqrt(7))
t.test(x)$conf.int
[1] 6.012665 9.593205
attr(,"conf.level")
[1] 0.95