Disposable shaving razors and disposable shaving razor cartridges are allowed in your carry on luggage.
Any other type of razor such as a straight edge razor, box cutters, utility knife etc are allowed on airplanes but must be in your checked luggage.
But it's okay and permitted to bring disposable razors on the airplane through your carry on luggage.