The smart contract is just the business logic of the blockchain so it does not store any values. Whether the data is stored in the blockchain or not depends on the smart contract. The smart contract can choose to store or not to store the values in the block.
The blockchain stored the values/information in two places:
1. Ledger: It stores all the transactions and is immutable.
2. State Database: It maintains the current state and represents the most recent values or changes made to the
chain.
To know the structure of the block, see the following link:
https://dev.to/damcosset/blockchain-what-is-in-a-block-48jo