Marif,
Carpet or no carpet, any work to stop squeaking has to be from underneath.
The sketch shows a closed string stair, and yours is probably a cut string, but the principle is the same.
If you have an old stair that squeaks you may be able to fix it by replacing the glue blocks or by simply adding more blocks.
Over the years the old glue perishes.
The glue blocks are essential. Say one for every 300 of width, to the tread to riser joint, and a couple each end at the tread and riser to string joint. They keep the whole structure firm. They stop squeaking in the stair.
You need access to the underside of the stair. Usually it is covered up, so depending on how annoying the squeaks are you may have to remove and later replace the plasterboard or other lining material.
Modern glues like the acrylic stud glue used for fixing plasterboard would be OK, and should last years. Otherwise use a more expensive gap filling epoxy.
Put a blob of glue on each face of the block, push it into position and then slide it along and back an inch or so a few times to expel the air.
Leave the excess glue in place, it all helps.
Glue blocks were used quite a lot in furniture, eg. for fixing drawer bottoms, and they can be replaced in the same way.
Cheers
Bill