Galaxy Formation in Standard and Modified Gravity