Upgrading a switch to a dimmer is a common improvement. The job is identical to a regular switch swap with one added consideration: the dimmer must be compatible with the load (the bulbs) it’s controlling.
Buy matched to your bulbs. If you have LED bulbs, buy LED- compatible. If you’ll upgrade to LED eventually, just buy LED-compatible now.
New LED-compatible dimmers ship with a compatibility list — the specific LED bulb brands and models they’ve been tested with. Check it. Mismatched LEDs + dimmers flicker, buzz, or refuse to dim past a certain point.
Dimmers have a max wattage rating. Typical: 600W for incandescent, 150W for LED (LED loads are effectively harder on the dimmer’s electronics even at lower watts).
Count your bulbs × their wattage. Stay under the dimmer’s rating.