The abstract summarizes a research article or other academic work so that readers can (1) quickly understand what information the work covers and (2) decide whether the document is relevant for them to continue reading.
A scientific abstract typically describes the logical steps in your critical thinking that you explain in detail in the main text (e.g., problem statement, aim/hypothesis, methods, results, and implications). Together with a description of the main methods and results, the content helps readers judge the value and robustness of your work. Based on their judgement, readers will decide whether to read your full article (and possibly cite it), potentially expanding the influence of your research.
You want readers to be able to make a quick yet correct choice about whether to continue reading your paper or not. You are trying to target readers who would benefit from knowing about your research. If your abstract clearly, concisely, and accurately summarizes your research and your target reader decides to read on, then you have written an effective abstract. Equally though, if someone who is not one of your target readers discovers your paper and finds the abstract not relevant to them, then you have also written an effective abstract. You are not wasting their time and they can move on.
Some journals may charge readers a fee to access your full paper, but abstracts are freely available. They may be discovered through searches of specific databases of research, such as PubMed, or through general internet searches. Therefore, to expand the potential reach of your research, you need to master writing effective abstracts.