Uncheck the position in the Flex tab of the player table, or write a group rule that caps how many of that position a lineup can use.
Flex tab. Open the Flex tab. Right-click the position column and choose the position you want out of the flex, which shows only those players. Uncheck them all by clicking the check box in the left hand corner of the projections table (see screenshot below). When you select all positions again, those players stay unchecked for the flex spot and stay eligible at their own position. If you want a couple of exceptions, leave those players checked.
Group rule. Open Rules, click Add New Rule, choose the group type, pick Automatic, and leave Group By unchecked. Set it to use no more than N primary players at that position, where N is the number of dedicated roster spots for it. In NFL that's no more than one TE. In NHL it's no more than two D. The lineup fills its required spots and has nothing left for the flex.
Keeping TEs out of the NFL flex is the common version. Keeping defensemen out of the NHL flex is the other.
Related: How do I control which players can be used as one-offs in my lineups? · How do I make sure my lineup rules are doing what I want them to?


