Hi kalyani0804,
Welcome to the Apple Community.
Macs generally work as they are set up to do.
It could be a setting somewhere ?
(Please excuse if the suggestions below are rather simplistic for you.)
As the random apps are loading on start up:
Wondering if your MacBook Pro is set up to re-load windows that were open when you last shut down ?
Log out, sleep, wake, restart, or shut down your Mac
Eg: If you don’t want app windows that are open to reopen when you log back in,
de-select “Reopen windows when logging back in.”
https://support.apple.com/en-au/guide/mac-help/mchlp2522/11.0/mac/11.0
Or are windows being "restored" when an app opens ?
See: Customise your Mac with System Preferences:
Eg: Check what you have selected In the "general" tab of System Preferences
(bottom section is reproduced below):
https://support.apple.com/en-au/guide/mac-help/mh15217/mac

Or, could it be something to do with
Working in multiple spaces on Mac: ?
https://support.apple.com/en-au/guide/mac-help/mh14112/mac
Hope this helps troubleshoot :)