Story Pointing is an estimation method that uses relative sizing. I.e. This thing is twice as big as that thing.
Relative sizing has fallen in and out of favour over the years but it can have many benefits. One significant benefit is that when a practice such as Planning Poker facilitates the process of sizing and estimating, it allows team members with different skill levels to communicate about and agree on an estimate. But this isn't the main benefit. The main benefit is that it helps ensure everyone has the same understanding of the feature or work-item being discussed. Story point discussions were and remain a useful practice to generate a deeper understanding of a problem. The estimate itself wasn't, and still isn't the most important outcome. It is the differences in estimates during the activity - which represent different assumptions and different levels of understanding from individual team members, and resolving them - that is the most valuable outcome.
Planning poker has been around for many years and is based on the Wide-band Delphi technique, a consensus-based technique for estimating effort.
And of course, relative sizing techniques have been used for centuries as part of structured decision-making techniques, to compare and select an option from a range of choices. Story-pointing can still be useful for helping to decide quickly which items will deliver the largest return on investment by helping to approximate the relative costs of backlog items. Sometimes this is referred to as T-shirt sizing. However, that is typically a cruder approach with less discussion and consensus and as such tends to have a higher margin of error. T-shirt sizes (S M L XL etc.) are not additive, unlike Story Points.
Below is a document that goes into more detail and is written in a format that can be reused as a starting point by a team to document their approach.