Can you make a cheap electric guitar good by switching the pickups for good ones? What else can you do to it to make it sound better?

Yes but there are a few upgrades that you can do to keep improving it. In order, I think these are the tone upgrades you should be looking for.

  1. Adjust your bridge saddles, pickup heights, action, and intonation – this costs 0$ and will improve the sound of your guitar greatly. Also if you have a strat, take off the back tremolo cover. This is a simple thing that Eric Johnson, John Mayer, SRV etc all did because it improves your tone and it takes like 1 minute to do.
  2. Pickup swap – pickups are the most significant guitar hardware upgrade you can do, and this can cost anywhere between $30 for GFS pickups to $1000+ for Seymour Duncan Zephyr, Abigail Ybarra or Tom Holmes pickups, pickups makers can really run the gamut and there’s a whole cottage industry out there. Also keep in mind you are using the correct pots and cap values, and with Fenders you should keep your volume and tone at full unless you have a treble bleed circuit or ‘Greasebucket’ circuit that correctly balances the treble/bass with the volume.
  3. Strings. Upgrade your strings, I’ve used Elixir coated strings for many years, but some people may prefer the traditional pure nickel strings, or nickel plated steel or some of Ernie Ball or D’addario’s or Dean Markley Blue Steel or DR Veritas new strings.
  4. Cables. If you are using a longer cable, try using a shorter one. The longer the cable length, the more highs you will lose from your tone.
  5. Pick. You can change out your picks, and Dunlop has virtually every pick type covered, different picks will produce different tone
  6. Tremolo / bridge / springs – you can swap out the bridge saddles for titanium ones (ie. KTS), add a brass sustain block (Schaller, KGC etc), and change out the springs (i.e Raw Vintage )
  7. Nut. You can change out the nut to get better tuning stability and a minor improvement in tone (i.e Graphtech)
  8. If you are using a few pedals, getting true bypass ones are fine but if you have many, make sure you put at least one buffered bypass pedal in your chain to offset the treble loss

There’s also other upgrades you can make to improve convenience and playability (locking tuners, different bridge types, neck radius, locking straps etc) but these won’t generally improve your tone.