About 4 hours ago I cut myself by washing a drinking glass. What should I do to prevent my knuckles from scarring?

Get help. The finest scar may require that this be sutured. Remember you need a scar to close your wound.
Antibiotic ointment. If your laceration is superficial keep it moist with Bacitracin ointment to prevent scabbing. If it is deep seek a consultation with a plastic surgeon or visit your local emergency department. I hope this information is helpful. Stephen weber, M.D., f.A.C.S. Lone tree facial plastic surgeon.