The Mammillaria cacti varieties that thrive as houseplants are the easiest to grow. They need a cooling period to promote blooming.
Here are funnel shaped Mammillaria flowers in yellow, but they may be in pink, red, green and white. The different Mammillaria varieties have spines, that look like hairy or woolly ones and are either stiff or soft and in a range of colors.
I can not actually say what the cause was to push cacti in bloom. There were no special conditions for their growth and flowering. Perhaps, I think this hot summer weather has so affected the cacti.
They suddenly started to bloom after I had planted little cuttings in small plastic cups. I disliked that Mammillarias were growing as woolly balls with a lot of cuttings which have fallen time to time on a windowsill.
Have you had the similar experience in cacti growing? When have they started to bloom?