If you're still running SQL Server 2012 and Windows Server 2012 or 2012 R2, you have a little more time to plan ahead for upgrading. Extended support for SQL Server 2012 (including the R2 version) will also end soon, on July 12, 2022; Windows Server 2012 and 2012 R2 extended support goes away on October 10, 2023.
At that point, you can pay for Extended Security Updates, which include critical and important patches, critical updates for SQL Server and access to support if you have an active support plan with Microsoft. They're distributed through the usual update channels, like Windows Update and WSUS.
ESUs for SQL Server 2012 and 2012 R2 will be available to purchase from April 2022 (so you know you won't miss any security updates when extended support stops). ESUs for Windows Server 2012 and R2 can be bought from July 2023.
ESUs are an expensive way of sticking with the older versions after the end of extended support. You have to have at least one month of Software Assurance or an Enterprise Agreement with subscription licences, you buy ESUs in in 2-core packs for SQL Server and 16-core packs for Windows Server 2012 and you'll be paying 75% of the licence cost for the latest version of SQL Server and Windows Server (not the version you're still running), just for the first year. For the second year, you're paying the same as the licence cost for the current versions and 125% of that licence cost for the third year.