Leave it alone, unless you know it’s been taken from the water unnaturally or you know it’s a species that isn’t able to survive unless it’s submerged. Most of the time, you won’t see them “on land”, but in the intertidal zone, so they’ll be underwater in a few hours again.
Some species are able to hunker down on a rock for hours and hours are just fine. You’ll see big purple and orange ochre sea stars clinging to piers and rocks and beaches all the time on the Pacific coast, waiting for the tide to come back in. Certain species lack internal support structures and their bodies will collapse on land, so you’ll only see them adrift in the surf or spat up by waves or animals.
If it’s on rock, you probably won’t be able to lift it anyway. They stick on real tight. If it’s on the sand and far away from the water, it may be worth picking it up and putting it near (but not in) the water, but otherwise they should be left alone. They don’t have brains, but they do know what they’re doing.