By tapping the happy Sim next to the status bars you can use cupcake. You can only get one when your sim isn't "inspired". It's next to your sim's needs bar, where your goal is displayed. If your sim is already inspired the cupcake will be white and you can't use it. Your sim won't be inspired when their needs are low, then the cupcake should be green and you can click it to get one. However, it costs 5 Lifestyle Points to use.