Turn on a multi-functional pressure cooker (such as Instant Pot®) and select Saute function. Melt butter. Add apple cider vinegar, brown sugar, and salt. Stir to combine. Mix in onion, grated apple, and red cabbage until well combined. Close and lock the lid. Select Steam function. Set timer for 3 minutes. Allow 10 to 15 minutes for pressure to build.
Release pressure carefully using the quick-release method according to manufacturer's instructions, about 5 minutes. Unlock and remove the lid. Mix in ground cloves and allspice.