Usually, money in pillar 3a accounts is reserved for when you retire. 🔐👴
Extra rule
You can withdraw the money 5 years prior your retirement.
Other exceptions:
You leave Switzerland permanently
You need to repay existing mortgages
You buy property which is used by yourself
You start a business/found an enterprise (in Switzerland)
You face the fate of disability
Death