First onion or first minced meat?
In order to develop browning for a good, deep flavor on the meat, you need a high temperature and a long enough time that having the onions in the pan the entire time would leave them  overcooked.  Also, the onions would express water, which would lower the temperature to simmer or steam, preventing the beef from browning.

For these reasons, it is common to sear or brown the ground (minced) meat, and then add the onions to cook through when it is done or nearly done.



You certainly could cook the onions separately, either in the same pan, or in a different pan.   Many people don't consider the extra effort and cleanup to be worth any marginal improvement in results.