Hello Monica Vasant, when performing an in-place upgrade from 2012 R2 to 2016, IIS should be upgraded from version 8.5 to 10, and it typically retains all configurations and settings. However, make sure to backup server, including the IIS configuration, before starting the upgrade. This ensures that you can restore the settings if anything goes wrong.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.