Under windows at least, Audacity is unable to record audio at bitrates above 16 bit.
It will seem to, all right, but the data is quantized at 16 bit (30 microvolt LSB), regardless of the settings chosen.
The attached images show the same source, the first recording is made in Audacity, supposedly 24 bit, but actually only 16 bit, while the second is recorded with a program than actually supports 24 bit, exported, and imported into Audacity. The data is amplified +70dB in both cases to make the difference visible.
Audacity will happily manipulate and save high bit rate data, but as a result of licensing restrictions and on account of it being freeware, it does not support the actual recording of this data.
***
Any internet search will confirm that the Windows version of Audacity is limited to 16 bit recording. And yes, it's more of a limitation of Windows than it is of Audacity. My irritation, however,
is chiefly with Audacity...