After the timer beeps, remove the Instant Pot lid. Remove the entire inner liner carefully and while wearing kitchen mitts. Drain off the excess liquid by pouring the beans into a colander.
Flip the setting on the Instant Pot to saute. Put the olive oil and chopped onion into the liner pan and place it back into the Instant Pot. Pour the beans from the colander back into the pot.
Using a potato masher, mash the beans until you get the texture that pleases you. Some like their beans a little smoother, while others like a little texture left. Either way is fine. You're the boss!
Move the beans around the Instant Pot every couple of minutes until you get a nice, browned color to them. The saute setting runs for 30 minutes, but your processing time will only take seven to ten minutes.
Enjoy your refried beans!
Notes
This recipe calls for onions. Some cooks like onions in their frijoles refritos but others do not. You may omit them if you like.