How to find the intersection of line segments?

When there are n random lines, I want to find all the points where two or more lines intersect.
Looking for someone who knows how to do this!
At my level, it’s only about finding the intersection of two lines.

Don’t hesitate to search the forum. There are several topics about intersections of lines.
For example: Set of utilities for 2d and 3d line math