Tipped or flat it is up to you!
I think you did well for a newbie. You made it back without swiming for it!
My advice is to always check the weather. Do not go out until you are comfortable with the idea of sailing in that wind force. For instance if you are comfortable with 15 knot breezes, then it's time to go to the next level. By watching the weather you can incrementally advance your wind comfort window. If you do this, at some point you will find yourself heading out into wind advisory conditions. The way to learn to handle a gale is to sail in a gale.
You were overpowered on your first solo trip. The winds kept picking up and the boat became hard to handle. When this happens it is time to shorten sail. Roll up a bit of jib and set your first reef in the main. Boat control instantly returns. A lot of heel is fun but, most boats are faster when sailed on their lines or at reasonable angles of heel. It's ok to "detrim" your sails a bit if conditions get stronger. But do not let your sails start luffing.
With a sloop you should drop the jib first and then the main. The mast is better supported under the main alone and you will have good boat control.
My advice to you is to go out when you will be a little challanged. Practice sailing heeled over and flattening the boat. Watch the speed. If you are trimmed right, flat will be anywhere from almost as fast to faster. It is important to be able so comfortably sail the boat both ways. If I am almost to port and the wind kicks up why bother reefing? Plus company loves the thrill of potential tipping that heeling brings. I prefer flat as less wine gets spilled.
One very good book you should consider purchasing is the Annapolis Book of Seamanship by John Rousmaniere. It has excellent chapters on sail and boat trim. It will serve you well if you want to continue learning on and off the water.