I've been doing Project-Euler just as a way to increase my competency in computer science. I'm currently a Pure and Applied Math major who recently adopted computer science as a minor in order to apply to grad schools in comp. sci.
Some built-in Sage functions that are extremely fast and I do not have comparably fast definitions include gcd, lcm, .intersection(), .is_prime(), prime_range(), .factor(), solve(),...
Many Project-Euler problems I've been able to solve relatively easily and quickly with these built-in functions but when I see the forums after answering the question, other people's answers are quite lengthy (as they are writing they're own code).
I'm debating if my method of getting through Project-Euler is truly a learning environment. I'm definitely learning more Sage commands and getting better at using Sage but I'm not sure my coding is getting any better unless I make my own definitions.
In essence what is the transition period between using built-in definitions to strictly using your own independently created code? Or what's more beneficial, being able to create your own relatively fast code or getting the job done as fast as possible (using built-in methods)?
From the perspective of a programmer/coder, it isn't a bad practice to use inbuilt functions when you can (in fact, people are lazy, if there's an inbuilt function, why do the work of manually defining another?)
Now, from the perspective of a mathematician, the aim of the problems there is to motivate you to understand algorithms properly (i.e., understand how it works, how the algorithm is constructed from basic tools) and then implementing them on your own to solve those problems.
Take your $\gcd()$ function for example. The mathematician's way to solve this would be implementing the Euclidean algorithm (recursive definition to find gcd). There's a one-line definition for it :
For lcm, you can just use the fact that $\textrm{lcm}(a,b)\gcd(a,b)=ab$ for positive integers $a,b$.
And similarly, you can think up of algorithms for all the other functions. After all, those inbuilt functions were programmed from scratch by someone using these basic mathematical algorithms.
So, in conclusion, there's no good or bad side to this, it just depends on your perspective. But since you're majoring in Mathematics and not Comp Sci, I'd recommend using inbuilt functions as rare as possible (use only when you can't think of an elementary algorithm to do it). If you do use an inbuilt function, try to search for a mathematical algorithm afterwards if you can and understand it well, so as to gain experience.