You have a text file and you want to append multiple lines after a line containing particular string, a command can be used as below
sed -i".bkp_`date +%Y%m%d`" '/\[Login\]/a RemoveIPC=no' /etc/systemd/logind.conf
Above command adds a line below the line [Login] in /etc/systemd/logind.conf file.
date +%Y%m%d" will create a backup of the file with extension suffix .bkp_<current_date> and edit the original in place.Similarly to add a line before the pattern i command can be used.
sed -i.bkp '/\[Login\]/i #Disabled removing of user IPC \
#DO NOT COMMENT RemoveIPC line' /etc/systemd/logind.conf
NOTES:
References: