How do I fix scratches that go into an aluminium frame?
My road bike is aluminium and I got a couple of scratches from a car rack too.

Fortunately, rust is not a significant problem.  Your options are


Leave it, and admire the battle scars.
Hide it with decals or accessories or tape.
Gently spot-sand and then use some nail polish or similar to hide the damage.  Generally takes two applications, sometimes more, to build the depth of colour and hide the silver.  You want a colour as similar to your paint as possible.  Don't bother touching up stickers
Full strip and respray - this is significant amounts of work and expense.


For completeness, if your bike was steel I'd say spot sand and prime with undercoat, then apply enamel touchup paint in a suitable colour.

If it was carbon fibre, I'd take it to an expert in carbon repair for a check.  Deep scratching that touches the fibres could be a weakness.



The first two images show chips in the topcoats, which revealed the bright white undercoat.  Possibly a poor preparation procedure, which make the top coat separate easy.





This last picture shows a length about 70 mm where all the top coat had come off.  Its got ~3 layers of $2 shop nail polish in place and seems to be holding the edges of the original paint in place pretty well too.