Does Time machine backup apps data and OS configuration?
Simple answer is yes.

Time Machine essentially creates incremental backups from everything. Can roll back folders and files to previous points - a more detailed explanation can be found on Wikipedia at https://en.wikipedia.org/wiki/Time_Machine_(macOS) or setup a new Mac or reinstall Mac OS from a time machine backup detailed at Apple Support page here https://support.apple.com/en-us/HT203981