If the strike is hit, you've bought in at what you believed was a reasonable price at the time of your contract creation. You may technically show a "loss," but you're getting something you wanted at the price you wanted.
If you buy a put instead you're effectively saying you strongly believe that the stock will fall to $x, and in this case, the fall to x will generate more money than the cost of the premium.
The second scenario is hard to get right because the option already has the statistical behavior of the stock priced into the premium. Your knowledge needs to be better than the collective knowledge of the market to make this viable
There's too much detail to cover in a short comment, but the main risks with a strategy like this is that the price drops well below your strike price and you're forced to buy the stock at higher price than the current market value. For cash-secured puts, you'll also need enough cash in your account to cover the purchase of the stock at your strike price. That said, depending on your mindset and goals, this can be a way to generate income while waiting for the right price.
The opposite side of this also applies for exiting positions. You can sell calls on a stock you own (covered calls) to collect a premium while you wait for the price to reach your chosen strike price. The risk being the potential that the price blows past your strike price, your shares get called away, and you don't get to profit from the extra gains above the strike.
Investment banks usually trade in volatility space, also called delta hedged. Main idea they would sell options (calls or puts) by adding extra premium to the fair price. At the same time they make the whole portfolio delta neutral by buying and selling underlying instruments on daily basis. By having significant portfolio one could expect to leak less on the hedging process and may be use some correlation between underlyings and use index futures instead of individual stocks. The whole business is to capture the premium mentioned above without predicting up or down move.
For example say you think Meta is a buy at $90. But Meta is trading at 109.57, so sell a put with a strike of $90 and collect a premium in return for agreeing to purchase a stock at $90. If the stock hits 90 or below the contract will be executed and you will purchase the shares at $90 (same as you were going to do with a limit order).
If it doesn't hit 90, you still pocket the premium.
It's like getting paid for having a limit order.
It's getting paid for taking on risk. A limit order will execute at your level or better, not worse.