According to Magma, the following are the groups with order less than $256$ satisfying the condition:
SmallGroup$(i,j)$ with $(i,j)$ equal to $(1,1)$, $(2,1)$, $(6,1)$, $(8,2)$, $(28,3)$, $(36,12)$, $(40,8)$, $(40,12)$, $(48,17)$, $(54,5)$, $(72,47)$, $(96,68)$, $(100,12)$, $(104,6)$, $(128,10)$, $(128,15)$, $(128,31)$, $(128,33)$, $(128,143)$, $(128,835)$, $(132,5)$, $(144,72)$, $(160,27)$, $(160,32)$, $(160,41)$, $(160,100)$, $(160,122)$, $(160,128)$, $(160,172)$, $(176,32)$, $(180,22)$, $(192,56)$, $(192,188)$, $(192,193)$, $(192,279)$, $(192,624)$, $(216,140)$, $(240,21)$, $(240,27)$, $(240,78)$, $(240,120)$, $(240,121)$, $(240,169)$, $(252,26)$.
I have to admit that I can't see much of a pattern to this, except that there are more than I would have expected. The sequence of orders is not in OEIS.
Edit: The sequence is in OEIS, but either Magma or sequence A368538 seems to have a mistake. The sequence misses out $36$. The group SmallGroup$(36,12)$ has $36$ subgroups, according to Magma. I'm using the command #AllSubgroups(SmallGroup(36,12)).
[Note: The sequence has now been corrected! Thanks go to Hugo Pfoertner.]
To respond to the question of Corentin B, all the groups in the above list are abelian or metabelian, but this pattern does not continue. SmallGroup$(720,545)$, $(960,6263)$, $(1008,895)$, $(1440,4717)$ are examples of derived length three. I do not know whether there are non-soluble examples, but it seems to me quite likely that there are; they may be quite large.