I wouldn't freeze onion or celery. Onion stores perfectly well and celery would do just what yours did. I don't freeze carrots either but that's because I can dig them out of the soil nearly all year. If you do decide to freeze them, then you need to blanche them first. I'm sure you'll find the method on Youtube or similar. Basically you boil in plenty of water for a certain number of minutes - beans 1 minute, peas 30 seconds, some things up to 3 mins but for carrots I don't know. Then you dunk them into very cold water, preferably iced, until they are completely cold. Spread on a tea towel or kitchen paper to dry then freeze on fast freeze. If you spread them out in the freezer bag, then when they are frozen you can rattle them so they aren't stuck together any more and you have free-flow veg. Suck all the air out of the freezer bag with a straw. It is a bit of a palaver, which is why I only do those things which freeze well, but don't store any other way.
There are not many things which don't benefit from blanching, but raspberries are one - they can just be spread out on trays to freeze, then stored free-flow in bags in the freezer.