This plant belongs to the family Asphodelaceae as it has terminal inflorescences, 6 tepals and a spiral arrangement of leaves amongst other features (PlantNET (The NSW Plant Information Network System). Royal Botanic Gardens and Domain Trust, Sydney. https://plantnet.rbgsyd.nsw.gov.au).
This plant is in the genus Dianella as it has a berry as a fruit, as seen from the images (PlantNET). It also has blue flowers, yellow anthers and backward-curved perianth segments ('Field Guide to the Native Plants of Sydney', Les Robinson 2003).
I identified the species as Dianella Caerulea as it is not in a maritime habitat and the inflorescences are present above the foliage (PlantNET). Leaves weren't purple towards roots.
This observation was interesting as it was quite small and found amongst other larger plants.