A macro lens can be any focal length. The ability to focus close enough to get a 1:1 image size ratio on the film or sensor makes it a macro lens. Macro lenses come in many different focal lengths. 35 mm, 50 mm, 60 mm, 100mm, 180 mm, and many more.
Can I take macro pictures if I can’t afford a macro lens?
Absolutely. You also can buy a different brand than your camera. Third party manufacturers have some excellent offerings that are much more economical than the brand names. But you don’t need a DSLR or mirrorless camera to take macro pictures. Some high quality point-and-shoot cameras have macro modes with surprising quality. I have one of those as my pocket camera for walking around or for extremely wet environments (it is water resistant). It can take high-quality images if I am able to use them without cropping. In fact, some of the images I sell were taken with that camera. The same goes for phone cameras. Many phones have cameras that far outperform my first few cameras (I have been taking pictures for over 50 years).
There are also other, less expensive alternatives. If you have a DSLR or a mirrorless camera you can buy a macro diopter lens that screws on the front of your lens and magnifies the image going into the lens. They are not quite as good as using a macro lens, but they are suitable for someone wanting to get a start in macro photography.
There are also macro tubes that are made to sit between your camera and lens. They put the back element of the lens farther away from the sensor, thus making it possible to focus at a closer distance to the subject—one suggestion. Do not buy the cheap kind that are nothing more than a metal cylinder. Buy a quality set of macro tubes that include electrical connections. They will make it possible to use the lens exactly like you normally would, except that you can/need to be closer to get the image in focus.