You have that backwards. WinRT is the managed languages runtime for Windows, introduced in Win8. Its sort of the replacement for COM/OLE but also defines the ABI dialect in a way that allows managed languages to call unmanaged code without an FFI penalty.
UWP is built on WinRT, and acts as a fully managed app container, similarly to how phone apps exist on your phone. It allows WinRT apps to be deployed to any Microsoft platform, Windows, XBox, Windows Phone, etc, but also Android and iOS, and also as PWA, and are guaranteed to run identically on any of those platforms. UWP apps must be written a fully managed language that runs on the CLR (ex: C# runs on the CLR, but C++/WinRT does not). UWP also uses the second generation of WinUI-family XAML UIs, which means all UWP apps use completely native UIs, instead of slow non-native Javascript shit in a web canvas.
The WinUI family of XAML UIs started with WPF, and a slightly incompatible version of it also appeared in Silverlight (WPF = WinUI 1.0), then was brought to UWP (= WinUI 2.0), and is now its own stand alone thing that any app can use, managed or not, as 3.0.
WinRT is not an attempt to move beyond .NET, instead it is their way of allowing .NET to natively call code, and make .NET languages first class in Windows.
Yeah but I think when it was introduced it wasn't a thing you could use separate from the rest of UWP. What changed in Win10 was you could use WinRT APIs from regular Win32 apps too. They started breaking UWP up into independent pieces.
Or not. I haven't thought about this stuff for years. Definitely possible I forgot the ordering of things.
UWP most certainly did not exist when WinRT came into existence. WinRT, itself, is also more or less the third version of this attempt: Managed C++ came first, then C++/CLI, then the WinRT era and C++/CX.
C++/CLI and C++/CX are semi-managed, you only need to use the extensions when interacting with WinRT, although you're free to write your entire app in that dialect.
WinRT is not the same thing as managed .NET code. There is no requirement that a UWP is .NET. There are many examples of unmanaged C++ UWPs, including the open source Windows Terminal.
WinRT is a mechanism to express APIs in a way that is amenable to cross-language usage. It is built on top of COM, and is not a replacement for COM.
Windows Terminal is sort of a clusterfuck of multiple programs, only one of which is a UWP program (the actual visible WinUI shell that runs) which you're not allowed to do as a UWP-era Microsoft Store app, but they got internal permission to do that.
Its now a WinUI 3.x program, apparently, and now the Store no longer requires UWP programs, so WT now only needs to make the "ships inside of Windows release images" guys happy, which apparently is harder than making the UWP-era Store guys happy.