Hi!
n=CV so C=n/V = 10⁻³/10¹ = 10⁻⁴ HCl + H20 = Cl⁻ + H3O⁺ same ratio of HCl and H3O⁺ so there’s also 10⁻⁴ moles of H3O⁺ pH=-log[10⁻⁴]=-(-4)=+4
Hope this helps!