Abbreviation of names
Objects
Java is, by definition, an Object-oriented language... but, that does not mean every program needs to follow those rules. This is an example program where there are no new objects that are relevant, and as a result, there's no real need to go beyond just procedural routines. You have Scanner, and String, and those are objects enough.
Consequently, you can do everything as static methods/functions, and no need to create anything using new.
Functions
Good code practices recommend a number of aspects to functions that would help here.
First up, functions should do one thing, and do that one thing well. By making functions simple, it makes it easier to reuse them, and combine them. Consider a simple function that gets the initial letter of any String:
public static String getInitial(String phrase) {
    return phrase.substring(0, 1);
}

That function has a useful name, I have made it static because it does not rely on any instance data/fields, and it is a simple stateless function.
Now, we can reuse that in the main method. All we need to do is separate the first and last names..... and a simple enough way to do that is your lastIndexOf(&quot; &quot;) call.
int lastspace = name.lastIndexOf(&quot; &quot;);
System.out.println(getInitial(name) + &quot; &quot; + getInitial(name.substring(lastspace + 1));

Now, there are a number of defensive problems in that code - what if the user does not input any space in their name, or the name is an empty string?
These things need to be fixed, and it makes the code more complicated. A common way to do these things is to split the data on multiple spaces, and output multiple initials, or an empty string if there are none....