In EF Core for example you have to specify which relations to include, either using ".Include()" or transforming the entire query with a "Select()". In the latter case this works pretty much automatically as long as you stay within the kinds of expressions EF Core can translate to SQL.
There is a different performance problem lurking with this design though. You have to decide whether to tell EF Core to do a query per relation or everything in one query. The single query is very efficient for many simple cases and ensures consistency, but it can fail spectacularly if you have a very large number of relations. This is a pretty significant footgun, but if you really don't want to be bothered with this you can just always use split queries.
ORMs can't really abstract over all performance considerations. They are convenient, but they can't fully hide what the database is doing under the hood.