If you are sick very soon after taking a tablet, before it has had time to be absorbed, the dose may have been lost. But whether you should take a replacement dose depends entirely on the medicine, because taking another too soon can risk a double dose if the first one was partly absorbed.
Some medicines have specific guidance for this situation, including contraceptives and others where a missed or vomited dose matters. The general missed-dose advice on the leaflet may apply, but it is safest to confirm rather than guess.
Contact your pharmacist or doctor for advice tailored to your medicine, especially if you keep vomiting and cannot keep doses down at all. Persistent vomiting may need separate treatment and could affect other medicines you take.