Okay, well, whatever
I don't think you have provided enough information about what you experienced to get a real answer or explanation. But I can tell you this:
If you sell a put option, the decision about whether the option will be exercised rests entirely with the party who bought the option from you, and to some degree with that party's broker. It is not your decision, and you have no control over it. The party who bought the put option you sold has the right, but not the obligation, to exercise the put and sell the stock to you at the strike price.
Even if the stock price is below the strike price when the market closes on expiration day, it is possible that the put option you sold will not be exercised. Likewise, if the price of the stock is above the strike price at expiration, it is possible that the put will be exercised.
To answer the question you posed in your original post, no, when you sell a put there is no guarantee that you will actually buy the stock at the strike price, regardless of what the closing price is on the day of expiration.
It is not common for a put to be exercised if the stock price is above the strike price. And if the stock price is below the strike price, it is unusual for holder to decide not to exercise. But there is no guaranteed outcome for the party that sold the put.
There are many reasons for these anomolous outcomes. Changes in the price of the stock during after-hours trading is one possibility. There are others. Most brokers have an "automatic exercise" policy. But if the party holding the put option does not own the stock, then exercising the put will result in a short sale.
It is is possible to buy a put option, without owning the stock, in a brokerage account that is not approved to sell stock short, or in an account that does not have enough equity to support selling short 100 shares of that stock.
If the stock price is below the strike price at expiration, and the holder does not own the stock and is not permitted to sell the stock short, then...
... in the name of all that is holy, the holder of the put should sell the put.
But if they don't do that, the broker is not obligated to perform an automatic exercise if the account cannot sell the stock short. If the holder takes no action and the broker takes no action, the put will expire worthless and will not be exercised.
I strongly recommend that you stop using the expressions sell put and sell call as noun phrases. That is not how options traders talk about these trades and people are not going to understand you.
Sell is a verb. Use it that way.
Don't say: I did a sell put.
Do say: I sold a put. Or: I am short one Feb 9 35 put.
Don't say: I did a sell call.
Do say: I sold a covered call. Or I wrote a covered call. (Both of which mean that you sold a call while holding the stock.)
Or: I am long the stock and short the Feb 9 35 call.