Binary sensor of wether a position is within 100m of another position?

I have the gps-locations of two devices - I would like to know whether they are within a certain distance from each other. Or if one location is within a radius of the other…

Any tips on how to achieve it?

Since HA internally is able to determine whether a location is within a radius the functionality seems to be there, can that be used somehow?

Have a look at the distance() function in the templating documentation. The docs have an example for the distance between two device_trackers that seems to be exactly what you want as a basis for your binary sensor.