I'll conjecture that for $n \gt 20$, $\ell(n) \le \sqrt{2n}+3.$

It seems optimal to have most points on only two lines. So consider first the case that there is at most one line with points on it having more than two lines.

Write $[a_1,a_2,\cdots,a_t]$ for the configuration of one line with $t$ points with point $i$ having $a_i$ *other* lines on it. Assuming that all other points have only $2$ lines on them, the number of other points is $$\sum_{i \lt j}a_ia_j= \frac{(\sum a_i)^2-\sum a_i^2}{2}$$ giving a total of $n=\frac{(\sum a_i)^2-\sum a_i^2}{2}+t$ points and $e=1+\sum a_i$ lines.

In brief $[n,e,[a_1,a_2,\cdots,a_t]$

If all the $a_i=1$ then $n=\binom{t}2$ and $e=t+1$ so $e=\lceil \sqrt{2n}\rceil$ which, as noted by several people, is minimal. So for $\binom{t}2 \lt n \le \binom{t+1}2$ the best we can possibly have is $e=t+2.$

Here are the best results of this special type with up to $11$ lines.

$[6, 4, [1, 1, 1]], [7, 7, [1, 5]], [8, 5, [1, 1, 2]], [9, 9, [1, 7]], $

$[10, 5, [1, 1, 1, 1]], [11, 6, [1, 2, 2]], [12, 7, [1, 1, 4]], [13, 6, [1, 1, 1, 2]], [14, 7, [1, 2, 3]],$

$ [15, 6, [1, 1, 1, 1, 1]], [16, 7, [1, 1, 1, 3]], [17, 7, [1, 1, 2, 2]], [18, 8, [1, 3, 3]], [19, 7, [1, 1, 1, 1, 2]], [20, 9, [1, 2, 5]],$

$ [21, 7, [1, 1, 1, 1, 1, 1]], [22, 8, [1, 2, 2, 2]], [23, 8, [1, 1, 1, 1, 3]], [24, 8, [1, 1, 1, 2, 2]], [25, 9, [1, 1, 2, 4]], [26, 8, [1, 1, 1, 1, 1, 2]], [27, 9, [1, 1, 1, 1, 4]],$

$[28, 8, [1, 1, 1, 1, 1, 1, 1]], [29, 9, [1, 1, 1, 2, 3]], [30, 9, [1, 1, 2, 2, 2]], [31, 9, [1, 1, 1, 1, 1, 3]], [32, 9, [1, 1, 1, 1, 2, 2]], [33, 10, [1, 2, 3, 3]], [34, 9, [1, 1, 1, 1, 1, 1, 2]], [35, 10, [1, 1, 1, 3, 3]], $

$[36, 9, [1, 1, 1, 1, 1, 1, 1, 1]] [37, 10, [1, 2, 2, 2, 2]], [38, 10, [1, 1, 1, 1, 2, 3]], [39, 10, [1, 1, 1, 2, 2, 2]], [40, 10, [1, 1, 1, 1, 1, 1, 3]], [41, 10, [1, 1, 1, 1, 1, 2, 2]], [42, 11, [1, 1, 2, 2, 4]], [43, 10, [1, 1, 1, 1, 1, 1, 1, 2]], [44, 11, [1, 1, 1, 1, 2, 4]],$

$[45, 10, [1, 1, 1, 1, 1, 1, 1, 1, 1]], [46, 11, [1, 1, 1, 1, 1, 1, 4]], [47, 11, [1, 1, 2, 2, 2, 2]], [48, 11, [1, 1, 1, 1, 1, 2, 3]], [49, 11, [1, 1, 1, 1, 2, 2, 2]], [50, 11, [1, 1, 1, 1, 1, 1, 1, 3]], [51, 11, [1, 1, 1, 1, 1, 1, 2, 2]], [53, 11, [1, 1, 1, 1, 1, 1, 1, 1, 2]], $

$[55, 11, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]$

A slight variation is to take a configuration (of this type or another), pick $s$ lines no $3$ sharing a point and consider the $\binom{s}{2}$ intersection points. These can be fused into one point preserving $e$ and decreasing $n$ to $n+1 -\binom{s}{2}.$

For example the configuration $[22, 8, [1, 2, 2, 2]]$ can have $3$ points determined by $3$ lines fused into $1$ to get a solution for $(20,8).$ This is better than the solution given with $(20,9).$