A shadow cannot levitate in emptiness, you must have something which can be the surface where the shadow is. The shadow itself can visualize the surface if there's a well drawn projection. Here's a drawn surface:

Also the bottom edge of your cop must be in accordance with the expected form, viewing direction and the shadow. I painted the bottom edge to look round.
The shadow is an elliptical selection filled with darker color or texture than the reference surface.
Elliptical -why? Your cop is approximately cylindrical and stands straight. If the light has close to vertical main direction,it makes geometrically an elliptical shadow on a horizontal surface. One must follow the rays to get it right. Edges of the shadow can be more or less blurred depending on how diffuse the light is.
A manually painted shadow pattern would be better than my area fill, the elliptical selection is too clinical. Also the reference surface should be a manually drawn one in a drawing, this is clearly a grainy pattern. Actually the horizon line and some thin, but preferably painted fill color could be enough.
Elliptical shadow is not true if the light comes from low altitude. It can even recreate recognizably the profile of the object if the light is not too diffuse. If you draw it as projected (=geometrically) approximately right, the shadow can well visualize the plane where it's projected on. In that case no painted plane is needed. An example:

That doesn't happen if the shadow is only a blurry spot with no glue what's the projection. The ambiguity is doubled If the object also has far from perfect projection.
The horizon line is optional. It helps to orient things in case the projections are not so perfect.
BTW. My 2nd shadow is an originally full black version of your cup, but flipped upside down, blurred, skewed, And wiped gradually off as the distance from the cop grows. The joint between the shadow and the cup is painted manually to look solid.
In 2D drawings there's no automatic technical method to decide what's the right shadow, the artist must decide them. 3D models can get it as a bonus with practically zero effort if one uses a 3D program which has realistic rendering or at least the capability to generate shadows in accordance with the given light conditions. The next screenshot is taken from an older case:

It's made in Trimble SketchUP, a free 3D program, well suited for beginners. Its pro version (not free) can be used as a serious scene sketching tool.
Light causes also shading and glosses on the object. I skip that subject in this case. But you must take it into the account sooner or later if you continue making drawings of real world objects. Watch objects in light and see what the light makes. There's no black outlines; for ex. a realistic face must be based on light and shadow. See practical hints in drawing tutorials.
The cream seems to have shading in your image, so you know already something of it. I drew my shadow in the same side as the shadow area on the cream.
Experimenting is much easier if the parts are in separate layers. For ex. the shadow is in my first version really an ellipse, most of it is only hidden below the cop layer.