In this order:
1. Gun reliably goes bang when you need it to go bang
2. You will actually carry it
3. You don’t hate shooting it
4. Who/when/how will it be carried?
Everything else is subordinate to the above. Caliber, make, model, capacity, size, price range can all wait until the first 4...