How to keep track of where the memory goes?

How to track where RAM goes? And where to look when 500mb of RAM is immediately spent at the start?

Memory consumption at the start of the application

The most doubtful entry is the following:

var balls = dbContext.TrainingObjects
    .Include(a => a.UserDetails)
    .ThenInclude(a => a.ApplicationUser)
    .ToList()
    .Where(a => a.Activity && a.Balls != 0 && (begin <= a.GetTime() && end >= a.GetTime()))
    .GroupBy(a => a.ApplicationUserId)
    .Select(a =>
        new BallRes
        {
            IdAccount = a.FirstOrDefault().UserDetails.ApplicationUser.Id,
            Username = a.FirstOrDefault().UserDetails.ApplicationUser.UserName,
            Image = a.FirstOrDefault().UserDetails.ApplicationUser.ImgSrc,
            Name = a.FirstOrDefault().UserDetails.ApplicationUser.FullName,
            Rank = a.FirstOrDefault().UserDetails.ApplicationUser.Rang,
            Point = a.Sum(e => e.Balls)
        }).OrderByDescending(a => a.Point).ToList();

Is it possible to optimize this somehow?

Author: Qwertiy, 2021-02-03