Dispose and Finalize are two methods for releasing resources held by .NET and .NET Core applications executing in the context of the CLR. If your application contains unmanaged resources, you must write the necessary code to release those resources explicitly.
Since finalization is non-deterministic and finalizers are expensive in terms of resource consumption, the Dispose method is preferred over a finalizer. You can use the Dispose method on any type that implements the IDisposable interface. Eventually, with the advent of asynchronous programming, .NET needed an asynchronous counterpart to IDisposable. Thus the IAsyncDisposable interface was introduced.