Yes, you may sell options on the day of expiry. If the option 'is in the money', why not; if it is not in the money and will not cost you more to sell it than to just let it expire, some money back is better than none.
A better strategy is to place a stop order based on how much (%) you are willing to lose. This way, you can minimise your losses. Another 'option' is to sell an option 3 or more strike prices above the strike price that you purchased if it was a CALL you bought OR sell a PUT option if the underlying equity drops below a certain price but your analysis suggests that it may not close below that price.
In either case, if the trade does not perform as planned, it is not a 100% loss. You need decide before placing the trade where you want to exit the trade –be it to take your profits or to exit if the trade goes against your plan. The amount should be the same for every trade since you are a beginner (5%, 10%, 20%, etc.). Keep in mind that some equities can have as much as $10 -$15 swings or more in a very short period of time so set your stops accordingly. I trust that this is helpful to you.
Happy Trades to You: 2c: