Of course. There's no reason you need the latest & greatest autofocus glass just to shoot stationary-ish celestial objects, that's for sure. And, that is one good thing about lenses, too: old lenses can keep on chugging literally for decades with little more attention than proper storage and some basic cleaning every once in a while.
I don't do astro, but I do shoot macro shots of stationary objects every once in a while. My workhorse lens is an older 105mm Nikkor (https://www.kenrockwell.com/nikon/105mm-f28.htm) that you can get in excellent to mint condition for little enough money that if it breaks or you drop it or something, you can just buy a new one.
It's truly a nice piece of glass, even though it doesn't autofocus with my body or auto-meter. It's every bit as sharp as Nikon's newest version of the same lens (https://www.bhphotovideo.com/c/product/424744-USA/Nikon_2160...), at 1/3 the price (or less), and without features I don't particularly need shooting stationary objects. You can even shoot a decent portrait with it, if you're not bothered by the lack of autofocus. Turns out there are lots of opportunities to save a little money if you don't care about having a fast lens to autofocus on a moving subject. :-) I spent more on my copy stand and stabilization equipment than I did on glass, and that was 100% the right thing to do.
If I had to share some takeaways from my experiences buying and using my DSLR + other equipment, I would say to focus on what you actually need, don't worry about getting the latest and greatest, and definitely consider used equipment. Following those principles, I got myself a couple of nice macro lenses, a D3400 body, a Kaiser copy stand, a lighting setup, and the cables & software to drive all of that, for around or maybe a little more than $1000. And, it works great & serves my needs just fine. Had I gone with brand new and current model stuff, I'd probably be well over double that.