Using Linq's Where/Select to filter out null and convert the type to non-nullable cannot be made into an extension method

You have to update your extension method to the following

public static IEnumerable<T> NotNull<T>(this IEnumerable<T?> enumerable) where T : class
{
    return enumerable.Where(e => e != null).Select(e => e!);
}

The point here is that you are converting the IEnumerable of nullable references to not nullable ones, therefore you'll have to use IEnumerable<T?>. where T : class generic constraint is needed to help the compiler distinguish between nullable reference type and Nullable<T> struct, as you can read here

Because of this issue between the concrete representations of nullable reference types and nullable value types, any use of T? must also require you to constrain the T to be either class or struct.

After that the following lines will be compiled without any warnings

var list = new List<MyObject?>();
IEnumerable<MyObject> notNull = list.NotNull();

This question is overlaps a lot with Is there a convenient way to filter a sequence of C# 8.0 nullable references, retaining only non-nulls?

One answer posted there exhibited best performance and was extremely consise, with the relevant coding snippet repeated here for posterity:

public static class Extension {
    public static IEnumerable<T> WhereNotNull<T>(this IEnumerable<T?> o) where T:class
        => o.Where(x => x != null)!;
}

Notably; you don't need to Select just to remove the ? annotation, and I think it's a pretty reasonable place to place a nullability ! given that it's pretty clearly correct and likely centralized. If you really cared about GC perf you might consider caching the delegate in a static readonly field, though whether that's meaningfully faster is something you'd need to measure.

If you prefer a zero-tolerance approach to non-null claims via !, then the other answer https://stackoverflow.com/a/59434717/42921 is likely as good as it gets.