Some medications can affect the result, so it may not be the accuracy of the test (they are normally pretty good) but something else in your body? Some allergy meds or sleeping tablets can affect the result.
If you follow the instructions properly, then a home pregnancy test is quite accurate. If you get a positive result, it’s likely correct as it’s about the level of hormones in your urine, but if it’s negative and you thought it was positive, maybe contact a doctor to confirm.