Greetings susannah92,
Have you attempted to update your MacBook Air 13" from macOS Montenery 12.6 to macOS Ventura 13.0 or just tried updating to the latest version of macOS Montenery? This problem may likely be fixed after an update as you may have reset and reformatted the MacBook while keeping the same software associated with the MacBook possibly being the issue.
If that does not work out, have you bought the MacBook from a Certified Apple Retailer or an Apple Store, or did you buy it from a third-party retailer such as a general tech shop?
If you still have the receipt or proof of purchase documents, you can go back to your retailer, show them your documents and either get a refund or a replacement product. If you are located in Australia after the retailer/service provider checks up the device, you may be able to obtain a free repair, replacement or refund under Australian Consumer Law or the Australian Consumer Rights and Guarantees Requirements. Considering you stated that the "problem has persisted through almost the whole time" that you had owned the MacBook, you most likely will receive compensation from the retailer as long as you still have the receipt or proof of purchase of the MacBook. You can check your Service and Support Coverage with your MacBook's Serial Number with the provided hyperlinks.
If you have any questions regarding how to fix the issue or if you cannot receive compensation from the retailer, please book an appointment with Apple Support or Apple Repair at your nearest Certified Apple Service Provider.
You can also reply to this thread if you have any additional queries.
Hope this helps and Good Luck,
Mohamed