Here is a some additional info. We consider the metric space $\left(\mathbb{Q},d\right)$ with $d=d(x,y)=|x-y|$. The metric $d$ induces a topology $\mathcal{O}_d$ with a basis consisting of all open intervals $(p,q)\cap \mathbb{Q}$ with rational endpoints $p,q$.
In the following we do not consider $\mathcal{O}_d$ as induced topology from the topological space $\mathbb{R}$ but rather as topological space in its own right.
(1) Is $\{q\in\mathbb{Q}:2<q^2<3\}$ closed?
We recall the set
\begin{align*}
\color{blue}{A=\{q\in\mathbb{Q}:2<q^2<3\}=\left(\left(-\sqrt{3},-\sqrt{2}\right)\cup\left(\sqrt{2},\sqrt{3}\right)\right)\cap\mathbb{Q}}\tag{1}
\end{align*}
is closed, if and only if the set $\mathbb{Q}\setminus A$ is open.
The set $\mathbb{Q}\setminus{A}$ is given as:
\begin{align*}
\color{blue}{\mathbb{Q}\setminus A=\left(\left(-\infty,-\sqrt{3}\right)
\cup\left(-\sqrt{2},\sqrt{2}\right)\cup\left(\sqrt{2},\infty\right)\right)\cap\mathbb{Q}}\tag{2}
\end{align*}
Note we are free to use open or closed parentheses around the irrational numbers $\pm\sqrt{2},\pm\sqrt{3}$ in (2) since these numbers are not elements of the topological space $\left(\mathbb{Q},\mathcal{O}_d\right)$ and they are excluded by intersection with $\mathbb{Q}$.
We show that $\mathbb{Q}\setminus A$ is open by taking any point $q$ from this set and deriving an open set containing this point and which is contained in $\mathbb{Q}\setminus A$.
We start with the left-most interval in (2). Let $q$ be a rational point in $\left(-\infty, -\sqrt{3}\right)$. Let $q_1=q-1$. Since $\mathbb{Q}$ is dense in $\mathbb{R}$ we know that between any two real numbers $a< b$ there is a rational number $r$ with $a<r<b$. So let $q_2$ be a rational number with $q<q_2<-\sqrt{3}$ and we conclude the open set $\left(q_1,q_2\right)\cap \mathbb{Q}$ fulfils
\begin{align*}
q\in\left(q_1,q_2\right)\cap\mathbb{Q}\subset \left(-\infty,-\sqrt{3}\right)\subset \mathbb{Q}\setminus A
\end{align*}
In the same way we can show that $\left(-\sqrt{2},\sqrt{2}\right)\cap\mathbb{Q}$ and $\left(\sqrt{2},\infty\right)\cap\mathbb{Q}$ are open sets. It follows that $\mathbb{Q}\setminus A$ is a union of open sets and therefore open.
We conclude the set $A=\{q\in\mathbb{Q}:2<q^2<3\}$ is closed.
Note: A shorter way to see that $A$ is closed: We inspect the right-hand side of (1) and observe the boundary $\partial A=\overline{A}\setminus A^{\circ}=\emptyset$. Then we recall a set $A$ is open and closed if and only if $\partial A=\emptyset$. We can in the same way show that $A$ is open as we did it for $\mathbb{Q}\setminus A$.
(2) Is $\{q\in\mathbb{Q}:2\leq q^2\leq 4\}$ compact?
Here we only note that a metric space is compact if and only if it is sequentially compact. A sequence which has not a converging subsequence has already been shown by the OP and by @KaviRamaMurthy .