Who is the final boss of undertale genocide
Solution 1:
Sans is the last enemy you really fight. Technically, after defeating Sans, you meet Asgore, who gets killed by the player without any player input, and then you meet Flowey who you completely destroy (again without any player input). Sans is considered the final boss of the Genocide Route.
Spoilers ahead.
If you read the wiki page on the Genocide Route starting from New Home here and scroll down a bit, you can see that after the Sans fight, three more things happen - Asgore dies, Flowey dies, and Chara talks to the protagonist / player directly and your game "glitches", implying the attack is damaging the game itself.
You can watch this playthrough (timestamped at 2:42:07) to see what happens.