On SharePoint Online, what you use instead of localized webparts depends whether you intend to use Modern or Classic pages.
On Classic, what is recommended is using App parts. There are two options for those, SharePoint hosted and provider hosted. If it is provider hosted, then the app part will be running in .NET on another server; you can use resx files there, and the user's language is passed to your aspx among the parameters.
The "$Resources:wss,language_value" will take the value en-US, or whatever, at run time because it gets it from SharePoint's wss.resx file. Note: app parts run in a separate site in a different domain on the same server, but it will generally inherit the same language as the host site.
The techniques above only work for Classic pages. For Modern pages, you need to use SPFx webparts. This is getting long, so read this guidance