That would make sense. I suppose you could just google "optifine using integrated graphics", as many other people have reported it.
Some possible solutions:
https://www.minecraftforum.net/forums/support/java-edition-support/2902923-optifine-uses-integrated-graphics-instead-of
https://www.google.com/search?client=firefox-b-d&q=optifine+using+integrated+graphics