Rust is the number-one Miata killer, and on NA and NB cars it hides in structural areas that are expensive or impossible to repair. Inspect the structure before you look at anything else.
Check these points in order, ideally with the car on a lift or ramps
…