In this work, we consider an extension of the symmetric teleparallel equivalent of General Relativity (STEGR), namely, $$f({\mathbb {Q}})$$
f
(
Q
)
gravity, by including a boundary term $${\mathbb {B}}_Q$$
B
Q
, where $${\mathbb {Q}}$$
Q
is the non-metricity scalar. More specifically, we explore static and spherically symmetric black hole and regular black hole solutions in $$f({\mathbb {Q}},{\mathbb {B}}_Q)$$
f
(
Q
,
B
Q
)
gravity coupled to nonlinear electrodynamics (NLED). In particular, to obtain black hole solutions, and in order to ensure that our solutions preserve Lorentz symmetry, we assume the following relation $$f_Q = -f_B$$
f
Q
=
-
f
B
, where $$f_{Q}=\partial f/\partial {\mathbb {Q}}$$
f
Q
=
∂
f
/
∂
Q
and $$f_{B}= \partial f/\partial {\mathbb {B}}_Q$$
f
B
=
∂
f
/
∂
B
Q
. We develop three models of black holes, and as the starting point for each case we consider the non-metricity scalar or the boundary term in such a way to obtain the metric functions A(r). Additionally, we are able to express matter through analytical solutions for specific NLED Lagrangians $${{\mathcal {L}}}_{\textrm{NLED}}(F)$$
L
NLED
(
F
)
. Furthermore, we also obtain generalized solutions of the Bardeen and Culetu types of regular black holes, by imposing specific metric functions.