If you replace the battery in the newest iPhones (iPhone XS or newer), a message indicating you need to service your battery appears in Settings > Battery, next to Battery Health. The “Service” message is normally an indication that the battery is degraded and needs to be replaced. The message appears when you insert a replacement battery – even when you swap a genuine Apple battery (or from another iPhone), the phone will still display the “Service” message.
You will see a notification on your lock screen for the first 4 days that you use your device, and in the Settings app for 15 days. After that period, you can find the notification by going to Settings > Battery > Battery Health.