I made a rectangle stroke in After Effects and I want to select one line from the shape and delete it so it's open from one side
In Illustrator I would pick the direct selection tool and click on the line to delete it, however I have no idea how that's done in After Effects?
Assuming it's a mask you've drawn:
Right click on the mask path: Mask and Shape path > Closed.
if you want to change which segment is open:
Select one of the mask vertices, then right click on that vertex: Mask and Shape path > Set first vertex.
A more flexible option would be to use a shape layer and the trim paths operator.
If you used the Rectangle tool to draw a shape layer rectangle you ended up with a parametric shape. What you have to do is right-click on Rectangle 1 path in the shape layer and select Convert to Bezier. When you have done that you have a path. Under rectangle, you will now have Path 1. Select Rectangle 1 > Path 1, then select the pen tool (g) and hold down the CtrlCmnd key and draw a selection around the two points you want to delete. You'll see the cursor change to an open white arrowhead. When you have two vertices selected right click close to the path and you should have a popup menu that has Mask at the top and then Mask and Shape Path on the second line. Click that and uncheck Closed.
That's it. A little more convoluted than AE but it works just fine.