Thanks for the query.
(hsg) will not affect the menstrual cycle in general.
But stress and strain due to the test can affect the hormonal
Better to rule out pregnancy
You can go for blood test
for pregnancy now or wait for 4 to 5 days and go for urine test for pregnancy.
According to the result you can proceed further.