Season pork on all sides with 1 tablespoon rosemary, 3/4 teaspoon salt, and 1/2 teaspoon pepper. Add oil to a programmable pressure multicooker (such as Instant Pot). Select SAUTE setting. Select HIGH temperature setting, and allow to preheat. Add pork; cook on all sides until nicely browned, about 3 minutes per side. Transfer pork to a plate. Pour off excess drippings in cooker; do not wipe cooker clean. Add onion, garlic, 1/2 teaspoon of the rosemary, and remaining 1/2 teaspoon each salt and pepper to cooker; cook, stirring constantly, until onion softens, about 1 minute. Add stock, stirring to scrape up any browned bits from bottom of cooker.