Yes, definitely. Expensive but possible. Original estimate by the Stanford University team was $200 billion in 1970s USD for a single Stanford Torus using materials from the Moon and a mass driver for most of the cosmic radiation shielding. I don't know of a more recent attempt at an accurate costing of the project. They expected it to pay itself back eventually through making solar power satellites and selling the power to Earth at a low price.
You don't have to do it all in one go though. You can build up to it gradually, build larger and larger habitats, and join habitats together.
I think myself that's the better approach if we want to do this. Especially - we haven't got much idea about how to maintain a closed system habitat that big. Biosphere II after all didn't succeed.
You can learn from your mistakes with smaller habitats. If something goes seriously wrong, in the worst case you can scrub the atmosphere and soil, and even, sterilize everything and start again. You can't do that with a planet.
The materials for a Stanford Torus don't need to be anything extra-ordinary. The original plans were developed in the 1970s and were judged to be feasible with 1970s technology.
The way they planned to do it was to keep the outer cosmic shielding stationary (that has to be 15 tons per square meter so is tough engineering challenge if rotating at 1 g), and rotate the habitat within it to provide the artificial g.
I suggest though that instead, you can rotate the habitat at a much slower rate to create, say, 1/100 g, so effective weight per square meter more like 150 kg. - or even 1/1000 g. That's for the majority of the habitat for plants which do find at zero g.
Then within it have full g habs for humans to sleep in, and spend much of their working day. These could either drive around the entire hab at 200 mph like trains - so generating g - or else - you could have smaller habs only 200 meters across for "hamlets" spinning fast enough to generate 1g. Is often said the Coriolis force is a problem for small 1 g habs - but people can tolerate the spin you get in a 200 meter diameter 1 g hab. So it doesn't have to be as big as the Stanford torus.
We need research though on what size of hab humans can tolerate as artificial g. There have been no artificial g experiments in orbit at all except for a half hour Gemini tethered satellite test in the 1960s.
When we do those tests, whenever we do, we may find that they permit much smaller and simpler habitats with artificial g, or artificial g only at night when you sleep in centrifuge sleeping units and so on.
There is much more room for colonization if you use materials from asteroids rather than planetary surfaces
There are major issues with terraforming a planet. We simply don't know if it would work, and there are many mistakes we could make, which might be irreversible, preventing the use of simple methods of terraforming by future wiser descendants.