Keep using it. But not as a Mac.
Apple is in the business of selling new hardware, and while their computers often last longer than cheaper Windows machines, they still suffer from the planned obsolescence endemic to the tech industry. For Macs, it happens in stages, as described on Apple’s page about “Vintage” and “Obsolete” devices.
My mid-2011 MacBook Air is well down the latter list, so if any of its model-specific parts break, it’s unrepairable.