The meaning of this dream depends a great deal on the action and the condition as well as the kind of razor.
If it was the old-fashioned barber’s type and the blade was dull, it is a warning to control your temper and/or.
your passion or be prepared for serious consequences; if the blade was bright and sharp (or you honed it), the dream predicts that your ability to cut through irrelevant issues will bring you gratifying recognition.
If you dreamed of cutting yourself on & razor (or razor blade), you will have to overcome some hostile opposition before you get what you want; fighting or slashing with a razor portends reverses due to impulsive, badly timed actions.
However, a safety razor in your dream predicts achievement through clever application of your ability to organize.
See also Shaving.... The Complete Guide to Interpreting Your Dreams