If you happened to live in a planetary system without adequate gas giants, you could probably find some way to scoop mass off the surface of your star or capture it from coronal mass ejections, then use fusion to transmute it into the materials you need. Even Sun is 1.90e30 kg, and it's rather small as stars go.
1. "Stellar husbandry". That phrase alone is worth the price of admission.
2. The idea of doing mass spectrometry on a jet of matter coming out of a star to separate it out into streams of hydrogen, deuterium, helium, etc.
3. The idea of creating artificial gas giants as a storage mechanism.
(The list goes on, but 3 is a magic number.)
But there is also the Dyson swarm, which is like a starlink constellation orbiting a star and designed to collect as much energy as possible.
Anyway I don't know the answer to your question, but if we ignore structural problems with a sphere we could imagine a material a few atoms thick, like a giant carbon nanotube structure. Then one wonders how much material there is in Jupiter as an approximation of total matter in the solar system. I will leave the calculation as an exercise to the reader. ;)
Per the Ringworld not being stable, I think the same math applies to the sphere as well as the Ring, so the sphere will need attitude jets to maintain position with respect to the central sun.
Dyson swarms seem drastically easier to construct. We could build one example of that habitat fairly soon!
Isaac Arthur's youtube channel goes into this in some depth (and is generally excellent, IMO). Here's an episode on Dyson Spheres:
plenty of material to capture the surface
+ you don't need a sphere, a ring/few rings would be enough