Regular Trim only works with 2D objects from the same plane. So you cannot use it here. You can use BREAKATPOINT to break your line where it crosses the 3Dface, your only challenge is in identifying that point.
You can use guiding lines to help you correctly identify the point where the lines and the faces meet. Or you can look into the geometric calculator to calculate the coordinate of the intersection and feed that point to the BREAKATPOINT command.
https://www.cadforum.cz/en/intersection-of-a-3d-curve-with-a-3d-surface-in-autocad-tip9357
To use guiding lines do the following, this will also work for curved surfaces and objects not aligned with the ucs.
From whatever view you are using, use the PROJECTGEOMETRY view to project your entire line to the surfaces. You will find that the newly created lines intersect with your existing line exactly where they go through your surface. With the 'intersection' object snap that point is selectable.