Why does the carbonyl of carboxylic acids get protonated and not the hydroxyl group?
Because the protonated acid is resonance-stabilized when the carbonyl is protonated, but isn't if the hydroxyl is protonated:



So the first protonated form is much more energetically favourable than the second.

The same resonance in the non-protonated acid means that the lone pair on the alkoxide has reduced basicity, meaning that the carbonyl lone pair is the more basic since it isn't involved in any energy-lowering orbital interactions(/resonances).