This weed sure does resemble Prickly Sow Thistle but the leaves seem much more prickly, thinner and more elongated than normal sow thistle. But, the yellow flower spike “fits” the profile, as does the area where it’s growing.
Prickly sow-thistle is a troublesome annual or overwintering weed common on arable land. It is also found in gardens, on roadsides, waste places and other disturbed habitats. It is recorded up to 1,500 ft in the UK. Prickly sow-thistle grows on most soils but prefers well drained slightly acid to alkaline soils, and has some tolerance of saline conditions.
There are many many different types of sow thistle some have prickly and some have smooth leaves. The ones I have growing in my garden at the moment have a smooth leaf just like the OP picture. If you look at the pictures on Tortoise Table you can see there are many variants of sow thistle.