The answer is no.
Let X be a Hirzebruch surface $H_n$. It can be viewed as a (smooth) toric variety generated by the fans
z0=(0,1)
z1=(0,-1)
z2=(1,0)
z3=(-1,-n)
f0=[z2,z0]
f1=[z2,z1]
f2=[z3,z0]
f3=[z3,z1]
, shown in this picture for $n=2$.

According to p.106 of Fulton's book "Introduction to toric varieties", the $\mathbb Z$-cohomology ring of $X$ is
$\mathbb Z(z_0,z_1,z_2,z_3)/(z_0z_1,z_2z_3,z_0-z_1-nz_3,z_2-z_3)$, and the $\mathbb Q$-cohomology
$\mathbb Q(z_0,z_1,z_2,z_3)/(z_0z_1,z_2z_3,z_0-z_1-nz_3,z_2-z_3)$. $^\text{[remark]}$
Therefore all the Hirzebruch surfaces $H_n$ have the same $\mathbb Q$-cohomology when $n\geq 1$, but their $\mathbb Z$-cohomology are different for even and odd $n$.
Remark: In fact, the Fulton book only provides $\mathbb Z$-cohomology directly, but the proof also works for $\mathbb Q$-cohomology. A more direct method of obtaining $\mathbb Q$-cohomology is by a SageMath computation:
n = 4 #try different values of n
cone1 = Cone([(1,0), (0,1)])
cone2 = Cone([(1,0), (0,-1)])
cone3 = Cone([(-1,-n), (0,-1)])
cone4 = Cone([(-1,-n), (0,1)])
H = Fan([cone1, cone2, cone3, cone4])
T = ToricVariety(H)
print(T.cohomology_ring().defining_ideal())