You start with a thin brass disc about the size of a dime.
First you use a punch to drive it through a die, ending up with a long cup the size of a .22 case but a bit longer and with no rim.
The next is to drive that through a hole to meet a flat surface. There is clearance above the flat surface in which the excess brass folds sideways to form the hollow rim.
I think the trade term may be “forming a bunt” but I stand open to correction.
The rimmed case is then driven out downwards to be fed to the next stage of the process.