Good morning, MazdaMan96,
So, if it is sitting overnight or longer and then won't start it's possible it is something called a "Parasitic Draw". So, something may be using power while the car is off and sitting.
The easiest way to check for this is to remove the positive battery terminal and hook up a test light between the positive terminal on the battery and positive battery cable. If something is staying on and draining the battery the light should illuminate.
Now start pulling fuses one circuit at a time until the light goes out. Since it seems to happen when it sits longer, I would start with lower amperage fuses like 10amp, 15amp, then 20amp. I would pull one, put it back then pull another.
Some things that could cause this are if something is left plugged into a power adaptor, an improperly installed radio, bad door ajar switch, things like that. Basically, things that are considered accessories.
If you don't have a test light, you can get one from your local auto parts store. (I will add a picture of this for you)
Here is an article to give you more information on this type of issue:
This article will give you some general information on diagnosing a no start problem, it may not specifically pertain to your issue, but I think it's a good article with a lot of useful information:
Images (Click to enlarge)
Sunday, April 30th, 2023 AT 5:12 AM