Does Time machine backup apps data and OS configuration? Does Time machine backup apps data and OS configuration or just apps and files?

Coming from Windows with a 3rd party full disk image backup(Note :I mean a disk clone, not the Windows' default backup an restore and functionality) , I would expect to be able to use time machine to restore the mac as it was in the moment I made a time machine backup.

I am honestly not aware how apps store data on MacOS though
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